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 rbenv
zinit ice wait lucid as'program' pick'bin/rbenv' from'gh' \
atclone'src/configure && make -C src' atpull'%atclone' nocompile'!'
atclone'src/configure && make -C src; libexec/rbenv init - > .zinitrc.zsh' \
atpull'%atclone' src'.zinitrc.zsh' nocompile'!'
zinit light rbenv/rbenv
# install ruby-build
@@ -19,24 +20,6 @@ zinit light rbenv/ruby-build
zinit ice wait lucid as'program' pick'bin/rbenv-each' from'gh'
zinit light rbenv/rbenv-each
# lazy-load rbenv
rbenv() {
load-rbenv
rbenv "$@"
}
_rbenv() {
load-rbenv
_rbenv "$@"
}
compctl -K _rbenv rbenv
load-rbenv() {
unset -f load-rbenv _rbenv rbenv
eval "$(command rbenv init -)"
}
# ==============================================================================
# aliases
# ==============================================================================