2020-08-19 20:35:04 +03:00
|
|
|
function _tide_item_rust
|
2021-02-17 07:46:48 +03:00
|
|
|
if test -e Cargo.toml -o (count *.rs) -gt 0
|
2020-09-08 18:13:15 +03:00
|
|
|
set_color $tide_rust_color
|
2020-09-08 17:53:53 +03:00
|
|
|
|
2020-08-20 18:44:50 +03:00
|
|
|
if test "$tide_rust_verbose_version" = false
|
2020-09-27 20:27:16 +03:00
|
|
|
# Cut off -suffixes. "v1.30.0-beta" vs "v1.30.0"
|
|
|
|
printf '%s' $tide_rust_icon' ' (rustc --version | string split ' ' | string split '-')[2]
|
2020-09-08 18:13:15 +03:00
|
|
|
else
|
|
|
|
printf '%s' $tide_rust_icon' ' (rustc --version | string split ' ')[2]
|
2020-08-20 18:44:50 +03:00
|
|
|
end
|
2020-08-19 20:35:04 +03:00
|
|
|
end
|
2021-03-02 20:46:40 +03:00
|
|
|
end
|