2013-11-08 19:26:05 +00:00
|
|
|
# get the node.js version
|
|
|
|
function nvm_prompt_info() {
|
2014-12-15 05:10:48 +00:00
|
|
|
[ -f "$HOME/.nvm/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}"
|
|
|
|
}
|