nvm.zsh 305 Bytes
Newer Older
1
2
# get the node.js version
function nvm_prompt_info() {
Luke Childs's avatar
Luke Childs committed
3
  [[ -f "$NVM_DIR/nvm.sh" ]] || return
4
5
6
7
8
9
  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}"
}