mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-25 13:06:32 +03:00
Fix rust item
This commit is contained in:
parent
451de67d2a
commit
4c0e3205a1
@ -1,14 +1,12 @@
|
|||||||
function _tide_item_rust
|
function _tide_item_rust
|
||||||
if not type --quiet rustc || not test -e Cargo.toml || test (count *.rs) -gt 0
|
if type --quiet rustc && test -e Cargo.toml -o (count *.rs) -gt 0
|
||||||
return
|
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
|
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
|
end
|
Loading…
Reference in New Issue
Block a user