chore: use zinit to lozy-load rbenv, goenv, pyenv, and nodenv

Instead of custom made functions
This commit is contained in:
2020-10-29 00:42:00 +00:00
parent 99401519ee
commit 4941ade4fc
4 changed files with 7 additions and 58 deletions

View File

@@ -8,7 +8,8 @@
# install nodenv
zinit ice wait lucid as'program' pick'bin/nodenv' from'gh' \
atclone'src/configure && make -C src' atpull'%atclone' nocompile'!'
atclone'src/configure && make -C src; libexec/nodenv init - > .zinitrc.zsh' \
atpull'%atclone' src'.zinitrc.zsh' nocompile'!'
zinit light nodenv/nodenv
# install node-build
@@ -31,24 +32,6 @@ zinit light ouchxp/nodenv-nvmrc
zinit ice wait lucid as'program' pick'bin/nodenv-package-*' from'gh'
zinit light nodenv/nodenv-package-rehash
# lazy-load nodenv
nodenv() {
load-nodenv
nodenv "$@"
}
_nodenv() {
load-nodenv
_nodenv "$@"
}
compctl -K _nodenv nodenv
load-nodenv() {
unset -f load-nodenv _nodenv nodenv
eval "$(command nodenv init -)"
}
# ==============================================================================
# aliases
# ==============================================================================