aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2016-03-22 19:10:33 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-03-22 19:10:33 +0300
commit81706dfe8d3bacabc99d35d8cb45a039fda0e1f2 (patch)
tree1e004f45d258f06adcc2e8cd7a9110beea04b9a3
parentd0e9baf45390ed8b4d9ae3ca007da526c4eb4f12 (diff)
parent7fcac16c5fa6ef6953e0fb168707a4e01e9b136d (diff)
Merge pull request #233 from wadkar/nvm_return_if_none
Fix NVM prompt to return if not used
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2ef4fe3c..cb1ab338 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -560,8 +560,8 @@ prompt_node_version() {
prompt_nvm() {
[[ ! $(type nvm) =~ 'nvm is a shell function'* ]] && return
local node_version=$(nvm current)
+ [[ -z "${node_version}" ]] || [[ ${node_version} = "none" ]] && return
local nvm_default=$(cat $NVM_DIR/alias/default)
- [[ -z "${node_version}" ]] && return
[[ "$node_version" =~ "$nvm_default" ]] && return
$1_prompt_segment "$0" "$2" "green" "011" "${node_version:1}" 'NODE_ICON'