diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-07-13 04:05:18 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-07-13 04:05:18 +0300 |
commit | 614422533062a7f945e9654dce69de87c77b9e24 (patch) | |
tree | ed7ca51427c02f2577d2bb6fdcf5ea2d8554ac67 /powerlevel9k.zsh-theme | |
parent | 79499dbb00147fea47a66492b46c110445371c91 (diff) | |
parent | 505a55b61c75f13a7bbbff56be54e9e8fc0f2054 (diff) |
Merging @dritter's Node.js segment support.
This is PR #53.
Merge remote-tracking branch 'dritter/dritter/nvm'
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index ddfdc023..cecb19db 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -472,6 +472,15 @@ prompt_longstatus() { [[ -n "$symbols" ]] && $1_prompt_segment "$0" "$bg" "$DEFAULT_COLOR" "$symbols" } +# Node version +prompt_node_version() { + local nvm_prompt=$(node -v 2>/dev/null) + [[ -z "${nvm_prompt}" ]] && return + NODE_ICON=$'\u2B22 ' # ⬢ + + $1_prompt_segment "$0" "green" "white" "${nvm_prompt:1} $NODE_ICON" +} + # rbenv information prompt_rbenv() { if [[ -n "$RBENV_VERSION" ]]; then |