[New] add support for $XDG_CONFIG_HOME

This commit is contained in:
Erik Lilja authored and Jordan Harband committed 2018-08-14 21:45:40 +02:00
1 parent f218a85454
commit 8542df4ac5
3 files changed
+13 -4

No files matched your search

+7 -1
View File
@@ -7,7 +7,13 @@ nvm_has() {
}
nvm_install_dir() {
command printf %s "${NVM_DIR:-"$HOME/.nvm"}"
if [ ! -z "$NVM_DIR" ]; then
printf %s "${NVM_DIR}"
elif [ ! -z "$XDG_CONFIG_HOME" ]; then
printf %s "${XDG_CONFIG_HOME/nvm}"
else
printf %s "$HOME/.nvm"
fi
}
nvm_latest_version() {