From 4f55fafd2cefbd0dcec6accb25f3bfcfbd2602c6 Mon Sep 17 00:00:00 2001 From: Brian Guthrie Date: Fri, 16 Apr 2010 16:19:43 +0530 Subject: [PATCH] Added personal zsh theme. --- themes/bguthrie.zsh-theme | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 themes/bguthrie.zsh-theme diff --git a/themes/bguthrie.zsh-theme b/themes/bguthrie.zsh-theme new file mode 100644 index 000000000..1820c4751 --- /dev/null +++ b/themes/bguthrie.zsh-theme @@ -0,0 +1,24 @@ +# Found on the ZshWiki +# http://zshwiki.org/home/config/prompt +# + +# As lifted from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ +function collapse_pwd { + echo $(pwd | sed -e "s,^$HOME,~,") +} + +function prompt_char { + git branch >/dev/null 2>/dev/null && echo 'λ' && return + hg root >/dev/null 2>/dev/null && echo 'λ' && return + svn info >/dev/null 2>/dev/null && echo 'λ' && return + echo '$' +} + +ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +PROMPT='[%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}:%{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)] +$(prompt_char) '