mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-24 20:41:36 +03:00
Fix rust item
This commit is contained in:
parent
451de67d2a
commit
4c0e3205a1
@ -1,14 +1,12 @@
|
||||
function _tide_item_rust
|
||||
if not type --quiet rustc || not test -e Cargo.toml || test (count *.rs) -gt 0
|
||||
return
|
||||
if type --quiet rustc && test -e Cargo.toml -o (count *.rs) -gt 0
|
||||
set -l rustVersion (rustc --version | string split ' ')[2]
|
||||
|
||||
if test "$tide_rust_verbose_version" = false
|
||||
set rustVersion (string split '-' $rustVersion)[1] # Cut off -suffixes from version. "v1.30.0-beta" vs "v1.30.0"
|
||||
end
|
||||
|
||||
set_color $tide_rust_color
|
||||
printf '%s' {$tide_rust_icon}' ' $rustVersion
|
||||
end
|
||||
|
||||
set -l rustVersion (rustc --version | string split ' ')[2]
|
||||
|
||||
if test "$tide_rust_verbose_version" = false
|
||||
set rustVersion (string split '-' $rustVersion)[1] # Cut off -suffixes from version. "v1.30.0-beta" vs "v1.30.0"
|
||||
end
|
||||
|
||||
set_color $tide_rust_color
|
||||
printf '%s' {$tide_rust_icon}' ' $rustVersion
|
||||
end
|
Loading…
Reference in New Issue
Block a user