Lazy load our shim loaders
This commit is contained in:
parent
0fccfd640c
commit
982439c2b2
2 changed files with 17 additions and 10 deletions
17
functions
17
functions
|
@ -55,3 +55,20 @@ function run {
|
|||
function npm-exec {
|
||||
(PATH=$(npm bin):$PATH; eval $@;)
|
||||
}
|
||||
|
||||
# lazy loading
|
||||
function rbenv {
|
||||
eval "$(command rbenv init -)"
|
||||
rbenv "$@"
|
||||
}
|
||||
|
||||
function nodeenv {
|
||||
eval "$(command nodenv init -)"
|
||||
nodenv "$@"
|
||||
}
|
||||
|
||||
function pyenv {
|
||||
eval "$(command pyenv init -)"
|
||||
eval "$(command pyenv virtualenv-init -)"
|
||||
pyenv "$@"
|
||||
}
|
||||
|
|
10
zshrc
10
zshrc
|
@ -27,16 +27,6 @@ fi
|
|||
zle -N insert-sudo
|
||||
bindkey "^z" insert-sudo
|
||||
|
||||
# init rbenv
|
||||
if test -d "$HOME/.rbenv"; then
|
||||
eval "$(rbenv init -)"
|
||||
fi
|
||||
|
||||
# init nodenv
|
||||
if which nodenv > /dev/null; then
|
||||
eval "$(nodenv init -)";
|
||||
fi
|
||||
|
||||
# completion
|
||||
autoload -U compinit
|
||||
compinit
|
||||
|
|
Loading…
Reference in a new issue