2013-11-08 19:26:05 +00:00
|
|
|
# get the node.js version
|
|
|
|
function nvm_prompt_info() {
|
2016-08-07 17:36:44 +00:00
|
|
|
[[ -f "$NVM_DIR/nvm.sh" ]] || return
|
2013-11-08 19:26:05 +00:00
|
|
|
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}"
|
|
|
|
}
|