diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-11-25 02:20:28 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-11-25 02:20:28 +0300 |
commit | 91e9fb865c1611dc08f29a377bfa1b791db945b4 (patch) | |
tree | 32d2ca4844341366a930a899acd06c3b60872859 | |
parent | 1eadf5ad76d0d9a9a5c4f6e6b2cde47c018363c0 (diff) | |
parent | 4b636d226ede68bdd621cd382182959491bf747a (diff) |
Merge pull request #156 from dritter/node_cleanup
Cleaning up the `node` segment.
-rwxr-xr-x | powerlevel9k.zsh-theme | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 002267f4..362077bb 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -395,11 +395,10 @@ prompt_load() { # Node version prompt_node_version() { - local nvm_prompt - nvm_prompt=$(node -v 2>/dev/null) - [[ -z "${nvm_prompt}" ]] && return + local node_version=$(node -v 2>/dev/null) + [[ -z "${node_version}" ]] && return - "$1_prompt_segment" "$0" "green" "white" "${nvm_prompt:1} $(print_icon 'NODE_ICON')" + "$1_prompt_segment" "$0" "green" "white" "${node_version:1} $(print_icon 'NODE_ICON')" } # print a little OS icon @@ -468,8 +467,8 @@ prompt_nvm() { local nvm_default=$(cat $NVM_DIR/alias/default) [[ -z "${node_version}" ]] && return [[ "$node_version" =~ "$nvm_default" ]] && return - NODE_ICON=$'\u2B22' # ⬢ - $1_prompt_segment "$0" "green" "011" "${node_version:1} $NODE_ICON" + + $1_prompt_segment "$0" "green" "011" "${node_version:1} $(print_icon 'NODE_ICON')" } # rbenv information |