mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Fix nvm plugin to use also check brew installs.
This commit is contained in:
parent
7fabc8bca4
commit
5d391f0955
2 changed files with 9 additions and 3 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#compdef nvm
|
||||
#autoload
|
||||
|
||||
[[ -s ~/.nvm/nvm.sh ]] || return 0
|
||||
if ![ -f $HOME/.nvm/nvm.sh ] && ![ $commands[brew] -a -f `brew --prefix`/opt/nvm/nvm.sh ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
|
|
@ -23,4 +25,4 @@ _arguments -C '*:: :->subcmds' && return 0
|
|||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "nvm subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# The addition 'nvm install' attempts in ~/.profile
|
||||
|
||||
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh
|
||||
if [ -f $HOME/.nvm/nvm.sh ]; then # manual user-local installation
|
||||
. ~/.nvm/nvm.sh
|
||||
elif [ $commands[brew] -a -f `brew --prefix`/opt/nvm/nvm.sh ]; then # mac os x with brew
|
||||
. $(brew --prefix)/opt/nvm/nvm.sh
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue