dotfiles/dot_oh-my-zsh/lib/nvm.zsh

7 lines
228 B
Bash
Raw Normal View History

2020-11-19 01:19:31 +00:00
# get the nvm-controlled node.js version
2020-06-15 10:31:33 +00:00
function nvm_prompt_info() {
2020-11-19 01:19:31 +00:00
which nvm &>/dev/null || return
local nvm_prompt=${$(nvm current)#v}
2020-06-15 10:31:33 +00:00
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
}