aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2016-04-19 22:23:43 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-04-19 22:23:43 +0300
commit511bbcf124552de06a2343ed20bdc97f15a9df2e (patch)
tree2da69b6ef7806c6ae484957acafdcb48ee6045a8
parentfb1dae68e9c76487eae937c35b9103b5e77d0716 (diff)
parentb8087ba7f972ac543faf349758f2e8565c199892 (diff)
Merge pull request #247 from orhanbalci/next
rust icon added to rust segment
-rw-r--r--README.md2
-rw-r--r--functions/icons.zsh3
-rwxr-xr-xpowerlevel9k.zsh-theme2
3 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9e9ff64c..6e91b319 100644
--- a/README.md
+++ b/README.md
@@ -120,7 +120,7 @@ The segments that are currently available are:
* [`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.
* **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:**
* **AWS Segments:**
diff --git a/functions/icons.zsh b/functions/icons.zsh
index e40d6060..6de09ee8 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -69,6 +69,7 @@ case $POWERLEVEL9K_MODE in
VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' # 
VCS_GIT_ICON $'\UE20E ' # 
VCS_HG_ICON $'\UE1C3 ' # 
+ RUST_ICON ''
)
;;
'awesome-fontconfig')
@@ -120,6 +121,7 @@ case $POWERLEVEL9K_MODE in
VCS_REMOTE_BRANCH_ICON ' '$'\UF204 ' # 
VCS_GIT_ICON $'\UF113 ' # 
VCS_HG_ICON $'\UF0C3 ' # 
+ RUST_ICON $'\UE6A8' # 
)
;;
*)
@@ -171,6 +173,7 @@ case $POWERLEVEL9K_MODE in
VCS_REMOTE_BRANCH_ICON $'\u2192' # →
VCS_GIT_ICON ''
VCS_HG_ICON ''
+ RUST_ICON ''
)
;;
esac
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index ed1c49cb..8bba6632 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -691,7 +691,7 @@ prompt_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" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version"
+ "$1_prompt_segment" "$0" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version" 'RUST_ICON'
fi
}
# RSpec test ratio