diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-21 12:36:09 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-21 12:36:09 -0600 |
commit | e3a28817b0a7ee5724884d9c132763af4a64182c (patch) | |
tree | 094a2e25f2efa94a922750b76643dacba7ace598 /themes/agnoster.zsh-theme | |
parent | 2d833d0b20726f58e8776a7158aaa7eca05d5ee9 (diff) | |
parent | 973c92cd91d595fde37a4dbd5a6389072654252f (diff) | |
download | zsh-e3a28817b0a7ee5724884d9c132763af4a64182c.tar.gz zsh-e3a28817b0a7ee5724884d9c132763af4a64182c.tar.bz2 zsh-e3a28817b0a7ee5724884d9c132763af4a64182c.zip |
merge agnoster theme
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r-- | themes/agnoster.zsh-theme | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index c6ded38d8..278a70181 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -127,6 +127,27 @@ prompt_git() { fi } +prompt_bzr() { + if (bzr status >/dev/null 2>&1); then + status_mod=`bzr status | head -n1 | grep "modified" | wc -m` + status_all=`bzr status | head -n1 | wc -m` + revision=`bzr log | head -n2 | tail -n1 | sed 's/^revno: //'` + if [[ $status_mod -gt 0 ]] ; then + prompt_segment yellow black + echo -n "bzr@"$revision "✚ " + else + if [[ $status_all -gt 0 ]] ; then + prompt_segment yellow black + echo -n "bzr@"$revision + + else + prompt_segment green black + echo -n "bzr@"$revision + fi + fi + fi +} + prompt_hg() { (( $+commands[hg] )) || return local rev status @@ -208,6 +229,7 @@ build_prompt() { prompt_dir prompt_git prompt_cabal_sandbox + prompt_bzr prompt_hg prompt_end } |