From 1ce8f7e15953198ca41232e6759ea7dfc8c3e31c Mon Sep 17 00:00:00 2001 From: Bodaniel Jeanes Date: Mon, 28 Jun 2010 09:08:35 +1000 Subject: [PATCH] =?UTF-8?q?Thanks=20to=20http://stevelosh.com/blog/2010/02?= =?UTF-8?q?/my-extravagant-zsh-prompt/=20I=20am=20now=20showing=20=C2=B1?= =?UTF-8?q?=20as=20prompt=20char=20in=20git=20repos=20and=20=E2=98=BF=20in?= =?UTF-8?q?=20Hg=20repos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/theme | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zsh/theme b/zsh/theme index a00ef3c..9b84d8f 100644 --- a/zsh/theme +++ b/zsh/theme @@ -10,10 +10,17 @@ function prompt_color() { fi } +function prompt_char { + git branch >/dev/null 2>/dev/null && echo '±' && return + hg root >/dev/null 2>/dev/null && echo '☿' && return + # echo '○' + echo '♪' +} + # Prompts ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[red]%}‹" ZSH_THEME_VCS_PROMPT_SUFFIX="›%{$reset_color%}" ZSH_THEME_VCS_PROMPT_FORMAT="${ZSH_THEME_VCS_PROMPT_PREFIX}%b:%h${ZSH_THEME_VCS_PROMPT_SUFFIX}" -PS1='%{$fg[blue]%}$(prompt_pwd)%{$reset_color%} %{$fg[$(prompt_color)]%}♪%{$reset_color%} ' +PS1='%{$fg[blue]%}$(prompt_pwd)%{$reset_color%} %{$fg[$(prompt_color)]%}$(prompt_char)%{$reset_color%} ' RPS1='$(${VCPROMPT} -f ${ZSH_THEME_VCS_PROMPT_FORMAT})'