Logo
Explore Help
Register Sign In
mirrors/ohmyzsh
1
0
Fork 0
You've already forked ohmyzsh
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-06-03 22:04:31 +08:00
Code Issues Projects Releases Wiki Activity
ohmyzsh/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 Version: 1.23.8 Page: 2229ms Template: 19ms
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