mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-26 09:42:51 +03:00
13 lines
445 B
Fish
13 lines
445 B
Fish
function _tide_item_rust
|
|
if test -e Cargo.toml -o (count *.rs) -gt 0
|
|
set_color $tide_rust_color
|
|
|
|
if test "$tide_rust_verbose_version" = false
|
|
# 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
|
|
end
|
|
end
|