diff options
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r-- | themes/agnoster.zsh-theme | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 7a62bd860..3a0c58b89 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -26,7 +26,13 @@ # A few utility functions to make it easy and re-usable to draw segmented prompts CURRENT_BG='NONE' -SEGMENT_SEPARATOR='' + +# Fix odd char on mac +if [[ `uname` == 'Darwin' ]]; then + SEGMENT_SEPARATOR='\ue0b0' +else + SEGMENT_SEPARATOR='' +fi # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, @@ -123,10 +129,10 @@ prompt_hg() { 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 + if `hg st | grep -q "^\?"`; then prompt_segment red black st='±' - elif `hg st | grep -Eq "^(M|A)"`; then + elif `hg st | grep -q "^[MA]"`; then prompt_segment yellow black st='±' else |