Minor edits

This commit is contained in:
Ilan Cosman 2020-09-27 10:27:16 -07:00
parent 48679a4d7e
commit 94a1b4cca6
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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