mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merge pull request #2236 from Isquariel/nvm
Added function to show current Node.js version and new Bureau theme
This commit is contained in:
commit
9357f2f41d
2 changed files with 122 additions and 0 deletions
9
lib/nvm.zsh
Normal file
9
lib/nvm.zsh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# get the node.js version
|
||||
function nvm_prompt_info() {
|
||||
[ -f $HOME/.nvm/nvm.sh ] || return
|
||||
local nvm_prompt
|
||||
nvm_prompt=$(node -v 2>/dev/null)
|
||||
[[ "${nvm_prompt}x" == "x" ]] && return
|
||||
nvm_prompt=${nvm_prompt:1}
|
||||
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue