Logo
Explore Help
Sign In
shell-user/oh-my-zsh
1
0
Fork 0
You've already forked oh-my-zsh
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-05-11 05:55:17 +00:00
Code Issues Projects Releases Wiki Activity
Files
1e5e834e0f6486a569efd6b12ce4e33624fef0c9
oh-my-zsh/lib/nvm.zsh

7 lines
228 B
Bash
Raw Normal View History

nvm: use `nvm current` in nvm_prompt_info and look in alternate install locations 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
2015-09-10 04:10:18 -04:00
# get the nvm-controlled node.js version
Added nvm.zsh to detect current Node.js version
2013-11-08 23:26:05 +04:00
function nvm_prompt_info() {
nvm: use `nvm current` in nvm_prompt_info and look in alternate install locations 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
2015-09-10 04:10:18 -04:00
which nvm &>/dev/null || return
nvm: simplify nvm.sh and bash completion loading
2020-10-09 16:12:03 +02:00
local nvm_prompt=${$(nvm current)#v}
Added nvm.zsh to detect current Node.js version
2013-11-08 23:26:05 +04:00
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 2785ms Template: 2ms
edge-auto
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API