diff options
author | Sudarshan Wadkar <git@wadkar.net> | 2016-03-17 00:25:39 +0300 |
---|---|---|
committer | Sudarshan Wadkar <git@wadkar.net> | 2016-03-17 00:27:00 +0300 |
commit | 7fcac16c5fa6ef6953e0fb168707a4e01e9b136d (patch) | |
tree | 73beaa2e634ee9febc358bd1f1a7d8a547a0f39f /powerlevel9k.zsh-theme | |
parent | f7b7ff21c9885a2a94f174336416dafa8b96c470 (diff) |
Combine two checks into one
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index c69c32c6..cb1ab338 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -560,9 +560,8 @@ prompt_node_version() { prompt_nvm() { [[ ! $(type nvm) =~ 'nvm is a shell function'* ]] && return local node_version=$(nvm current) - [[ ${node_version} = "none" ]] && return + [[ -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' |