aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudarshan Wadkar <wadkar@cmu.edu>2016-03-04 23:44:58 +0300
committerSudarshan Wadkar <wadkar@cmu.edu>2016-03-04 23:44:58 +0300
commit415194941cdce3b6aec97e7f147d2f07a93dbd70 (patch)
tree14e6ff0a310a3c9069cfe2a12da2f6ea94fb04d2
parent4f0c3ffdf838955741894b52fab6b41d312ab167 (diff)
[WIP] Rebase to origin:next branch
-rwxr-xr-xpowerlevel9k.zsh-theme11
1 files changed, 11 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 72d37318..2ef4fe3c 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -622,6 +622,17 @@ prompt_rbenv() {
fi
}
+# chruby information
+# see https://github.com/postmodern/chruby/issues/245 for chruby_auto issue with ZSH
+prompt_chruby() {
+ local chruby_env
+ chrb_env="$(chruby 2> /dev/null | grep \* | tr -d '* ')"
+ # Don't show anything if the chruby did not change the default ruby
+ if [[ "${chrb_env:-system}" != "system" ]]; then
+ "$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "${chrb_env}" 'RUBY_ICON'
+ fi
+}
+
# Print an icon if user is root.
prompt_root_indicator() {
if [[ "$UID" -eq 0 ]]; then