Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added nvm.zsh to detect current Node.js version

  • Loading branch information...
commit 5c73cb671bde7a151a7a36fe782ce44dba1b0531 1 parent e30a124
@isqua isqua authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/nvm.zsh
View
9 lib/nvm.zsh
@@ -0,0 +1,9 @@
+# get the node.js version
+function nvm_prompt_info() {
+ [ -f $HOME/.nvm/nvm.sh ] || return
+ local nvm_prompt
+ nvm_prompt=$(node -v 2>/dev/null)
+ [[ "${nvm_prompt}x" == "x" ]] && return
+ nvm_prompt=${nvm_prompt:1}
+ echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
+}
Please sign in to comment.
Something went wrong with that request. Please try again.