mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
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
8 lines
265 B
Bash
8 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}"
|
|
}
|