mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 12:46:39 +00:00
chore: use zinit to lozy-load rbenv, goenv, pyenv, and nodenv
Instead of custom made functions
This commit is contained in:
21
zsh/ruby.zsh
21
zsh/ruby.zsh
@@ -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
|
||||
# ==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user