From 8c72e719c7320666c56db15247529d95c2dd9a47 Mon Sep 17 00:00:00 2001 From: Andy Ferra Date: Fri, 2 Sep 2011 23:22:53 -0700 Subject: [PATCH 1/2] added theme: andyferra --- themes/andyferra.zsh-theme | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 themes/andyferra.zsh-theme diff --git a/themes/andyferra.zsh-theme b/themes/andyferra.zsh-theme new file mode 100644 index 000000000..38c07b96a --- /dev/null +++ b/themes/andyferra.zsh-theme @@ -0,0 +1,17 @@ +function git_branch() { + branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') + + if [ "$branch" != "" ]; then + if [ "$branch" = "master" ]; then + echo "%{${FG[154]}%}[$branch]%{${reset_color}%}" + else + echo "%{${FG[161]}%}[$branch]%{${reset_color}%}" + fi + else + echo "" + fi +} + +PROMPT=' +%c $(git_branch) +%{${FG[237]}%}↳%{${reset_color}%} ' From 20de4aa6f532dd4724153ebd4d0da88be4179476 Mon Sep 17 00:00:00 2001 From: Andy Ferra Date: Fri, 2 Sep 2011 23:52:31 -0700 Subject: [PATCH 2/2] few tweaks --- themes/andyferra.zsh-theme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/andyferra.zsh-theme b/themes/andyferra.zsh-theme index 38c07b96a..6133792e2 100644 --- a/themes/andyferra.zsh-theme +++ b/themes/andyferra.zsh-theme @@ -3,9 +3,9 @@ function git_branch() { if [ "$branch" != "" ]; then if [ "$branch" = "master" ]; then - echo "%{${FG[154]}%}[$branch]%{${reset_color}%}" + echo "%{${FG[154]}%}($branch)%{${reset_color}%}" else - echo "%{${FG[161]}%}[$branch]%{${reset_color}%}" + echo "%{${FG[161]}%}($branch)%{${reset_color}%}" fi else echo "" @@ -14,4 +14,4 @@ function git_branch() { PROMPT=' %c $(git_branch) -%{${FG[237]}%}↳%{${reset_color}%} ' +%{${FG[237]}%}↪%{${reset_color}%} '