Merge pull request #247 from orhanbalci/next

rust icon added to rust segment
pull/22/head
Ben Hilburn 9 years ago
commit 511bbcf124

@ -120,7 +120,7 @@ The segments that are currently available are:
* [`rbenv`](#rbenv) - Ruby environment information using `rbenv` (if one is active). * [`rbenv`](#rbenv) - Ruby environment information using `rbenv` (if one is active).
* [`rspec_stats`](#rspec_stats) - Show a ratio of test classes vs code classes for RSpec. * [`rspec_stats`](#rspec_stats) - Show a ratio of test classes vs code classes for RSpec.
* **Rust Segments:** * **Rust Segments:**
* `rust_version` - Display the current rust version. * `rust_version` - Display the current rust version and [logo](https://www.rust-lang.org/logos/rust-logo-blk.svg).
**Cloud Segments:** **Cloud Segments:**
* **AWS Segments:** * **AWS Segments:**

@ -69,6 +69,7 @@ case $POWERLEVEL9K_MODE in
VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' #  VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' # 
VCS_GIT_ICON $'\UE20E ' #  VCS_GIT_ICON $'\UE20E ' # 
VCS_HG_ICON $'\UE1C3 ' #  VCS_HG_ICON $'\UE1C3 ' # 
RUST_ICON ''
) )
;; ;;
'awesome-fontconfig') 'awesome-fontconfig')
@ -120,6 +121,7 @@ case $POWERLEVEL9K_MODE in
VCS_REMOTE_BRANCH_ICON ' '$'\UF204 ' #  VCS_REMOTE_BRANCH_ICON ' '$'\UF204 ' # 
VCS_GIT_ICON $'\UF113 ' #  VCS_GIT_ICON $'\UF113 ' # 
VCS_HG_ICON $'\UF0C3 ' #  VCS_HG_ICON $'\UF0C3 ' # 
RUST_ICON $'\UE6A8' # 
) )
;; ;;
*) *)
@ -171,6 +173,7 @@ case $POWERLEVEL9K_MODE in
VCS_REMOTE_BRANCH_ICON $'\u2192' # → VCS_REMOTE_BRANCH_ICON $'\u2192' # →
VCS_GIT_ICON '' VCS_GIT_ICON ''
VCS_HG_ICON '' VCS_HG_ICON ''
RUST_ICON ''
) )
;; ;;
esac esac

@ -691,7 +691,7 @@ prompt_rust_version() {
rust_version=$(rustc --version 2>&1 | grep -oe "^rustc\s*[^ ]*" | grep -o '[0-9.a-z\\\-]*$') rust_version=$(rustc --version 2>&1 | grep -oe "^rustc\s*[^ ]*" | grep -o '[0-9.a-z\\\-]*$')
if [[ -n "$rust_version" ]]; then if [[ -n "$rust_version" ]]; then
"$1_prompt_segment" "$0" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version" "$1_prompt_segment" "$0" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version" 'RUST_ICON'
fi fi
} }
# RSpec test ratio # RSpec test ratio

Loading…
Cancel
Save