diff options
author | yleo77 <ylep77@gmail.com> | 2013-07-16 16:37:18 +0800 |
---|---|---|
committer | yleo77 <ylep77@gmail.com> | 2013-07-16 16:37:18 +0800 |
commit | 67b2781f6200a0dff35055eb67937a0df2be2c51 (patch) | |
tree | 73b692f4146042966f7d2fed10ab88946cbc077b /themes/agnoster.zsh-theme | |
parent | 6b832b93588567cb00b9a9e8170a5ebf539dea51 (diff) | |
parent | 7f74294d7aa7ab86e18e70a1153c15fa373c5849 (diff) | |
download | zsh-67b2781f6200a0dff35055eb67937a0df2be2c51.tar.gz zsh-67b2781f6200a0dff35055eb67937a0df2be2c51.tar.bz2 zsh-67b2781f6200a0dff35055eb67937a0df2be2c51.zip |
Merge remote-tracking branch 'robbyrussell/master'
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r-- | themes/agnoster.zsh-theme | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index a9de8c84e..c7a59ad0d 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -26,7 +26,7 @@ # A few utility functions to make it easy and re-usable to draw segmented prompts CURRENT_BG='NONE' -SEGMENT_SEPARATOR='⮀' +SEGMENT_SEPARATOR='' # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, @@ -90,7 +90,7 @@ prompt_git() { zstyle ':vcs_info:*' formats ' %u%c' zstyle ':vcs_info:*' actionformats '%u%c' vcs_info - echo -n "${ref/refs\/heads\//⭠ }${vcs_info_msg_0_}" + echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_}" fi } @@ -110,7 +110,7 @@ prompt_hg() { # if working copy is clean prompt_segment green black fi - echo -n $(hg prompt "⭠ {rev}@{branch}") $st + echo -n $(hg prompt " {rev}@{branch}") $st else st="" rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') @@ -124,7 +124,7 @@ prompt_hg() { else prompt_segment green black fi - echo -n "⭠ $rev@$branch" $st + echo -n " $rev@$branch" $st fi fi } @@ -134,6 +134,14 @@ prompt_dir() { prompt_segment blue black '%~' } +# Virtualenv: current working virtualenv +prompt_virtualenv() { + local virtualenv_path="$VIRTUAL_ENV" + if [[ -n $virtualenv_path ]]; then + prompt_segment blue black "(`basename $virtualenv_path`)" + fi +} + # Status: # - was there an error # - am I root @@ -152,6 +160,7 @@ prompt_status() { build_prompt() { RETVAL=$? prompt_status + prompt_virtualenv prompt_context prompt_dir prompt_git |