1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

don't output segment if node_version was not populated

This commit is contained in:
Robert Jorgenson 2016-01-14 14:09:39 -07:00
parent e29b3545bd
commit 2fa7b1d08f

View file

@ -538,7 +538,7 @@ prompt_nvm() {
[[ "$node_version" =~ "$nvm_default" ]] && return
fi
$1_prompt_segment "$0" "$2" "green" "011" "${node_version:1}" 'NODE_ICON'
[[ -n "${node_version}" ]] && $1_prompt_segment "$0" "$2" "green" "011" "${node_version:1}" 'NODE_ICON'
}
# print a little OS icon