mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 05:40:07 +00:00
Add segment for rust version.
This commit is contained in:
parent
0673352e7e
commit
5d314bec8e
1 changed files with 9 additions and 0 deletions
|
@ -479,6 +479,15 @@ prompt_rbenv() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# print Rust version number
|
||||||
|
prompt_rust_version() {
|
||||||
|
local rust_version
|
||||||
|
rust_version=$(rustc --version 2>&1 | grep -oe "^rustc\s*[^ ]*" | grep -o '[0-9.a-z\\\-]*$')
|
||||||
|
|
||||||
|
if [[ -n "$rust_version" ]]; then
|
||||||
|
"$1_prompt_segment" "$0" "208" "$DEFAULT_COLOR" "$rust_version"
|
||||||
|
fi
|
||||||
|
}
|
||||||
# RSpec test ratio
|
# RSpec test ratio
|
||||||
prompt_rspec_stats() {
|
prompt_rspec_stats() {
|
||||||
if [[ (-d app && -d spec) ]]; then
|
if [[ (-d app && -d spec) ]]; then
|
||||||
|
|
Loading…
Reference in a new issue