summaryrefslogtreecommitdiff
path: root/lib/nvm.zsh
diff options
context:
space:
mode:
authorLuke Childs <lukechilds123@gmail.com>2016-08-07 18:36:44 +0100
committerMarc Cornellà <marc.cornella@live.com>2016-08-07 19:36:44 +0200
commita7de0fabd7ebbf1776942a8c7fde8ee33ed681b0 (patch)
treee9b1da02aeb49d292618d08ae34ccf1ea8d15285 /lib/nvm.zsh
parent7654b16b3963844e5079a8935eb93f108c52f273 (diff)
downloadzsh-a7de0fabd7ebbf1776942a8c7fde8ee33ed681b0.tar.gz
zsh-a7de0fabd7ebbf1776942a8c7fde8ee33ed681b0.tar.bz2
zsh-a7de0fabd7ebbf1776942a8c7fde8ee33ed681b0.zip
nvm plugin improvements (#5265)
* Export $NVM_DIR if it doesn't exist and use it when looking for nvm * Use $NVM_DIR when looking for nvm for completion * Use $NVM_DIR when looking for nvm in nvm_prompt_info
Diffstat (limited to 'lib/nvm.zsh')
-rw-r--r--lib/nvm.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nvm.zsh b/lib/nvm.zsh
index 61d997fc0..4a8b6811e 100644
--- a/lib/nvm.zsh
+++ b/lib/nvm.zsh
@@ -1,6 +1,6 @@
# get the node.js version
function nvm_prompt_info() {
- [ -f "$HOME/.nvm/nvm.sh" ] || return
+ [[ -f "$NVM_DIR/nvm.sh" ]] || return
local nvm_prompt
nvm_prompt=$(node -v 2>/dev/null)
[[ "${nvm_prompt}x" == "x" ]] && return