mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-24 12:33:34 +03:00
Minor edits
This commit is contained in:
parent
48679a4d7e
commit
94a1b4cca6
@ -2,10 +2,9 @@ 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 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 "$nodeVersion" != "$tide_nvm_default_node"
|
||||
if string match --quiet --regex "^$NVM_DIR.*" $nodePath || # If node path begins with NVM_DIR
|
||||
test -n "$tide_nvm_default_node" -a "$nodeVersion" != "$tide_nvm_default_node"
|
||||
|
||||
set_color $tide_nvm_color
|
||||
printf '%s' $tide_nvm_icon' ' $nodeVersion
|
||||
end
|
||||
|
@ -3,7 +3,8 @@ function _tide_item_rust
|
||||
set_color $tide_rust_color
|
||||
|
||||
if test "$tide_rust_verbose_version" = false
|
||||
printf '%s' $tide_rust_icon' ' (rustc --version | string split ' ' | string split '-')[2] # Cut off -suffixes. "v1.30.0-beta" vs "v1.30.0"
|
||||
# Cut off -suffixes. "v1.30.0-beta" vs "v1.30.0"
|
||||
printf '%s' $tide_rust_icon' ' (rustc --version | string split ' ' | string split '-')[2]
|
||||
else
|
||||
printf '%s' $tide_rust_icon' ' (rustc --version | string split ' ')[2]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user