mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Adds node version prompt
This commit is contained in:
parent
bd6dbd1d9b
commit
d7614987fd
1 changed files with 8 additions and 0 deletions
8
lib/node.zsh
Normal file
8
lib/node.zsh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# get the node.js version
|
||||
function node_prompt_info() {
|
||||
local node_prompt
|
||||
node_prompt=$(node -v 2>/dev/null)
|
||||
[[ "${node_prompt}x" == "x" ]] && return
|
||||
node_prompt=${node_prompt:1}
|
||||
echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${node_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue