diff options
author | Amila Perera <perera.amila@gmail.com> | 2013-11-23 10:33:30 +0530 |
---|---|---|
committer | Amila Perera <perera.amila@gmail.com> | 2013-11-23 10:33:30 +0530 |
commit | 27d048aa5729dfb9fa8119bc8ed4abb61619d7ea (patch) | |
tree | 61cc1d756677109ccbc5c45893e0b9a2dab96387 /themes | |
parent | 4e7b0fe083ecc99c1ea8c250d8b9cfcde09f2cd3 (diff) | |
parent | 9f5a895192b7d6b75ba717ef4e2c9b6ed7977c68 (diff) | |
download | zsh-27d048aa5729dfb9fa8119bc8ed4abb61619d7ea.tar.gz zsh-27d048aa5729dfb9fa8119bc8ed4abb61619d7ea.tar.bz2 zsh-27d048aa5729dfb9fa8119bc8ed4abb61619d7ea.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'themes')
-rw-r--r-- | themes/agnoster.zsh-theme | 66 | ||||
-rw-r--r-- | themes/linuxonly.zsh-theme (renamed from themes/linuxonly) | 0 |
2 files changed, 33 insertions, 33 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 2db565266..01cdc80e5 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -95,38 +95,38 @@ prompt_git() { } prompt_hg() { - local rev status - if $(hg id >/dev/null 2>&1); then - if $(hg prompt >/dev/null 2>&1); then - if [[ $(hg prompt "{status|unknown}") = "?" ]]; then - # if files are not added - prompt_segment red white - st='±' - elif [[ -n $(hg prompt "{status|modified}") ]]; then - # if any modification - prompt_segment yellow black - st='±' - else - # if working copy is clean - prompt_segment green black - fi - echo -n $(hg prompt "☿ {rev}@{branch}") $st - else - st="" - rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') - branch=$(hg id -b 2>/dev/null) - if `hg st | grep -Eq "^\?"`; then - prompt_segment red black - st='±' - elif `hg st | grep -Eq "^(M|A)"`; then - prompt_segment yellow black - st='±' - else - prompt_segment green black - fi - echo -n " $rev@$branch" $st - fi - fi + local rev status + if $(hg id >/dev/null 2>&1); then + if $(hg prompt >/dev/null 2>&1); then + if [[ $(hg prompt "{status|unknown}") = "?" ]]; then + # if files are not added + prompt_segment red white + st='±' + elif [[ -n $(hg prompt "{status|modified}") ]]; then + # if any modification + prompt_segment yellow black + st='±' + else + # if working copy is clean + prompt_segment green black + fi + echo -n $(hg prompt "☿ {rev}@{branch}") $st + else + st="" + rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') + branch=$(hg id -b 2>/dev/null) + if `hg st | grep -Eq "^\?"`; then + prompt_segment red black + st='±' + elif `hg st | grep -Eq "^(M|A)"`; then + prompt_segment yellow black + st='±' + else + prompt_segment green black + fi + echo -n "☿ $rev@$branch" $st + fi + fi } # Dir: current working directory @@ -137,7 +137,7 @@ prompt_dir() { # Virtualenv: current working virtualenv prompt_virtualenv() { local virtualenv_path="$VIRTUAL_ENV" - if [[ -n $virtualenv_path && -z $VIRTUAL_ENV_DISABLE_PROMPT ]]; then + if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then prompt_segment blue black "(`basename $virtualenv_path`)" fi } diff --git a/themes/linuxonly b/themes/linuxonly.zsh-theme index a11b80d7f..a11b80d7f 100644 --- a/themes/linuxonly +++ b/themes/linuxonly.zsh-theme |