mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-06-05 11:56:28 +08:00
Add support for xdg base directory
This commit is contained in:
parent
745291dcf2
commit
dfe705f987
@ -1,6 +1,10 @@
|
|||||||
ZSH_NVM_DIR=${0:a:h}
|
ZSH_NVM_DIR=${0:a:h}
|
||||||
|
|
||||||
[[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm"
|
_zsh_nvm_default_install_dir() {
|
||||||
|
[[ -z "${XDG_CONFIG_HOME-}" ]] && echo "$HOME/.nvm" || echo "$XDG_CONFIG_HOME/nvm"
|
||||||
|
}
|
||||||
|
|
||||||
|
[[ -z "$NVM_DIR" ]] && export NVM_DIR="$(_zsh_nvm_default_install_dir)"
|
||||||
|
|
||||||
_zsh_nvm_rename_function() {
|
_zsh_nvm_rename_function() {
|
||||||
test -n "$(declare -f $1)" || return
|
test -n "$(declare -f $1)" || return
|
||||||
|
Loading…
Reference in New Issue
Block a user