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
99460351eb8d8d9d5ea2e44b66e1b9ceaaa4a368
oh-my-zsh/lib/nvm.zsh

7 lines
236 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}
fix(lib): quote % in `nvm_prompt_info`
2021-12-26 19:31:07 +01:00
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt:gs/%/%%}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
Added nvm.zsh to detect current Node.js version
2013-11-08 23:26:05 +04:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 805ms Template: 1ms
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