Merge pull request #142 from dritter/rust_version
Added Rust version segment.
This commit is contained in:
commit
9b067ea29c
2 changed files with 10 additions and 0 deletions
|
@ -479,6 +479,15 @@ prompt_rbenv() {
|
|||
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 $rust_version"
|
||||
fi
|
||||
}
|
||||
# RSpec test ratio
|
||||
prompt_rspec_stats() {
|
||||
if [[ (-d app && -d spec) ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue