diff --git a/lib/functions.zsh b/lib/functions.zsh index 838b0c6..b1a61f0 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -20,7 +20,7 @@ source_if_exists() { [[ -f "$1" ]] && source "$1" } -run_before() { +lazy_load() { local command="$1" local init_command="$2" diff --git a/zshrc b/zshrc index 97cfbf3..bb4662a 100755 --- a/zshrc +++ b/zshrc @@ -7,5 +7,5 @@ for script in zgen aliases widgets theme; do source_if_exists "$DOTFILES_PATH/custom/$script.zsh" done -run_before rbenv 'eval "$(rbenv init -)"' -run_before sdk 'source_if_exists "$SDKMAN_DIR/bin/sdkman-init.sh"' +lazy_load rbenv 'eval "$(rbenv init -)"' +lazy_load sdk 'source_if_exists "$SDKMAN_DIR/bin/sdkman-init.sh"'