aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorChris Chou <chhschou@gmail.com>2017-10-05 23:47:37 +0300
committerChris Chou <chhschou@gmail.com>2017-10-05 23:47:37 +0300
commit5657fe6ac7d75cac48a386f55e429b716f8d7623 (patch)
tree547edb00ac00680b7c4d11eaefd03db8a3fec3df /powerlevel9k.zsh-theme
parent688f6203b4a1e048ee45bb9493069ab22840fd54 (diff)
#632: Indicate `Rust` or `(rust)` for rust_version segment only if icon is unavailable
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 5aa280c6..edb94632 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1095,9 +1095,9 @@ prompt_root_indicator() {
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" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version" 'RUST_ICON'
+ "$1_prompt_segment" "$0" "$2" "208" "$DEFAULT_COLOR" "$rust_version" 'RUST_ICON'
fi
}
# RSpec test ratio