diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-05-26 22:51:01 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-05-26 22:51:01 +0300 |
commit | ddef3a6584fdaead20082c65919377cbc5117f74 (patch) | |
tree | 96a389af4868392d301b127988b4231f9e76724b /powerlevel9k.zsh-theme | |
parent | f7af54cdf23e8fff0dedaa6dca26bcce73cbea98 (diff) |
Added the node version.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d1e927c8..a3f973ff 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -310,6 +310,14 @@ prompt_longstatus() { [[ -n "$symbols" ]] && $1_prompt_segment $bg $DEFAULT_COLOR "$symbols" } +# Node version +prompt_node_version() { + local nvm_prompt=$(node -v 2>/dev/null) + [[ -z "${nvm_prompt}" ]] && return + + $1_prompt_segment green white ${nvm_prompt:1} +} + # rbenv information prompt_rbenv() { if [[ -n "$RBENV_VERSION" ]]; then |