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

Merge pull request #233 from wadkar/nvm_return_if_none

Fix NVM prompt to return if not used
This commit is contained in:
Ben Hilburn 2016-03-22 12:10:33 -04:00
commit 81706dfe8d

View file

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