mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[zsh] Reimplement loading of custom scripts.
This commit is contained in:
parent
be27b811f7
commit
091449f604
2 changed files with 11 additions and 5 deletions
|
@ -6,6 +6,10 @@ bytecount() { wc -c "$@" | numfmt --to=iec-i; }
|
|||
|
||||
mkcd() { mkdir -p "$@" && cd "${@[-1]}"; }
|
||||
|
||||
# Re-added from:
|
||||
# https://github.com/dmitmel/dotfiles/blob/16f0a1cf32ec97355da2e17de1c4bb458431767b/zsh/functions.zsh#L19
|
||||
source_if_exists() { [[ -f "$1" ]] && source "$1" }
|
||||
|
||||
silence() { $1 &>/dev/null }
|
||||
|
||||
viscd() {
|
||||
|
|
12
zsh/zshrc
12
zsh/zshrc
|
@ -52,11 +52,13 @@ for script in functions options path env plugins aliases completion zle prompt c
|
|||
_perf_timer_stop "$script.zsh"
|
||||
done
|
||||
|
||||
for script in $ZSH_DOTFILES/custom/**; do
|
||||
_perf_timer_start "$script"
|
||||
source "$script"
|
||||
_perf_timer_stop "$script"
|
||||
done
|
||||
if [[ -d "$ZSH_DOTFILES/custom" ]]; then
|
||||
for script in $ZSH_DOTFILES/custom/*.zsh; do
|
||||
_perf_timer_start "custom/${script##*/}"
|
||||
source "$script"
|
||||
_perf_timer_stop "custom/${script##*/}"
|
||||
done
|
||||
fi
|
||||
|
||||
command_exists rbenv && eval "$(rbenv init -)"
|
||||
|
||||
|
|
Loading…
Reference in a new issue