diff options
author | Bob Williams <bobwilliams.ii@gmail.com> | 2014-03-22 21:24:52 -0400 |
---|---|---|
committer | Bob Williams <bobwilliams.ii@gmail.com> | 2014-03-22 21:24:52 -0400 |
commit | d70e73294494e68c94879c7bf22f708a3049a9d4 (patch) | |
tree | 696f9a6cb49cab00924942eb5147b99b5fb1798d /themes | |
parent | 5a586670d73dbbda97d124e33398aabf21597659 (diff) | |
parent | 178b5224e830845e45070ef803fcdb5a3f468dca (diff) | |
download | zsh-d70e73294494e68c94879c7bf22f708a3049a9d4.tar.gz zsh-d70e73294494e68c94879c7bf22f708a3049a9d4.tar.bz2 zsh-d70e73294494e68c94879c7bf22f708a3049a9d4.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'themes')
-rw-r--r-- | themes/gallois.zsh-theme | 2 | ||||
-rw-r--r-- | themes/gnzh.zsh-theme | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme index 1ff86b54c..f1057a9a9 100644 --- a/themes/gallois.zsh-theme +++ b/themes/gallois.zsh-theme @@ -18,7 +18,7 @@ else if which rbenv &> /dev/null; then RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' else - if which chruby_prompt_info &> /dev/null; then + if [[ -n `which chruby_prompt_info` && -n `chruby_prompt_info` ]]; then RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1' else RPS1='$(git_custom_status) $EPS1' diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme index 3c6b8a409..33f187bc6 100644 --- a/themes/gnzh.zsh-theme +++ b/themes/gnzh.zsh-theme @@ -6,7 +6,7 @@ autoload -U colors zsh/terminfo # Used in the colour alias below colors setopt prompt_subst -# make some aliases for the colours: (coud use normal escap.seq's too) +# make some aliases for the colours: (could use normal escape sequences too) for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do eval PR_$color='%{$fg[${(L)color}]%}' done @@ -25,7 +25,7 @@ elif [[ $UID -eq 0 ]]; then # root fi # Check if we are on SSH or not -if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then +if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH else eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH @@ -36,12 +36,12 @@ local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})" local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}' local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}' local rvm_ruby='' -if which rvm-prompt &> /dev/null; then +if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect local user rvm installation + rvm_ruby='%{$PR_RED%}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%{$PR_NO_COLOR%}' +elif which rvm-prompt &> /dev/null; then # detect sysem-wide rvm installation rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}' -else - if which rbenv &> /dev/null; then - rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}' - fi +elif which rbenv &> /dev/null; then # detect Simple Ruby Version management + rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}' fi local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}' |