ef44416df2
This makes it work regardless of where nvm is loaded from. And it uses nvm's version strings, which distinguish the "system" and "none" NVM environments, instead of reporting the specific version of the system node.js or erroring, respectively. Fixes #4336 Closes #4338
9 lines
265 B
Bash
9 lines
265 B
Bash
# get the nvm-controlled node.js version
|
|
function nvm_prompt_info() {
|
|
local nvm_prompt
|
|
which nvm &>/dev/null || return
|
|
nvm_prompt=$(nvm current)
|
|
nvm_prompt=${nvm_prompt#v}
|
|
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
|
|
}
|