Combine two checks into one

pull/22/head
Sudarshan Wadkar 9 years ago
parent f7b7ff21c9
commit 7fcac16c5f

@ -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'

Loading…
Cancel
Save