nvm: simplify nvm.sh and bash completion loading

This commit is contained in:
Marc Cornellà
2020-10-09 16:12:03 +02:00
parent ef44416df2
commit d8cb670235
2 changed files with 27 additions and 44 deletions

View File

@@ -1,8 +1,6 @@
# 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}
local nvm_prompt=${$(nvm current)#v}
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
}