mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-23 17:02:24 +03:00
Reorder nvm item
This commit is contained in:
parent
81cfe19b0f
commit
43469e4be8
@ -2,12 +2,10 @@ function _tide_item_nvm
|
||||
if set -l nodePath (command --search node) # Ensure node is installed
|
||||
set -l nodeVersion (string split / $nodePath)[-3] # Much faster than node --version
|
||||
|
||||
if test -n "$tide_nvm_default_node"
|
||||
if test "$tide_nvm_default_node" != "$nodeVersion"
|
||||
set_color $tide_nvm_color
|
||||
printf '%s' $tide_nvm_icon' ' $nodeVersion
|
||||
end
|
||||
else if string match --quiet --regex "^$NVM_DIR.*" $nodePath # If node path begins with nvm directory
|
||||
if string match --quiet --regex "^$NVM_DIR.*" $nodePath # If node path begins with nvm directory
|
||||
set_color $tide_nvm_color
|
||||
printf '%s' $tide_nvm_icon' ' $nodeVersion
|
||||
else if test -n "$tide_nvm_default_node" -a "$tide_nvm_default_node" != "$nodeVersion"
|
||||
set_color $tide_nvm_color
|
||||
printf '%s' $tide_nvm_icon' ' $nodeVersion
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user