mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Allow setting path to nvm install dir.
- same behavior as the two lines the nvm install script puts in bashrc - set NVM_DIR to path where nvm is installed - allows for global installs in /opt or /usr/local
This commit is contained in:
parent
ff4663a6b8
commit
73c160fdca
2 changed files with 3 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#compdef nvm
|
#compdef nvm
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
[[ -s ~/.nvm/nvm.sh ]] || return 0
|
[[ -s "${NVM_DIR:=~/.nvm}" ]] || return 0
|
||||||
|
|
||||||
local -a _1st_arguments
|
local -a _1st_arguments
|
||||||
_1st_arguments=(
|
_1st_arguments=(
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
# The addition 'nvm install' attempts in ~/.profile
|
# The addition 'nvm install' attempts in ~/.profile
|
||||||
|
|
||||||
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh
|
NVM_DIR="${NVM_DIR:=~/.nvm}"
|
||||||
|
[[ -s "${NVM_DIR}/nvm.sh" ]] && . "${NVM_DIR}/nvm.sh"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue