From 2a8767e5e7543104561b671dd0a25cbdb33e0386 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Sat, 16 Jun 2012 20:48:00 -0500 Subject: [PATCH] [zsh] added back accidentally deleted function + cleaned up left prompt and rprompt --- zsh/prompt.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 4765323..0cc82e7 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -23,6 +23,12 @@ unpushed() { /usr/bin/git cherry -v @{upstream} 2>/dev/null } +git_prompt_info() { + ref=$(/usr/bin/git symbolic-ref HEAD 2>/dev/null) || return +# echo "(%{\e[0;33m%}${ref#refs/heads/}%{\e[0m%})" + echo "${ref#refs/heads/}" +} + need_push() { if [[ $(unpushed) == "" ]] then @@ -36,5 +42,5 @@ directory_name(){ echo "%{$fg_bold[cyan]%}%1/%\/%{$reset_color%}" } -export PROMPT=$'in $(directory_name) $(git_dirty)$(need_push)\nāžœ ' +export PROMPT=$'$(directory_name) %{$fg_bold[cyan]%}āžœ%{$reset_color%} ' export RPROMPT=$'$(git_dirty)$(need_push)'