From a9da3e497db6e45bef0e2df728514bad78ab8606 Mon Sep 17 00:00:00 2001 From: Gaetan Semet Date: Mon, 4 Mar 2013 16:41:32 +0100 Subject: [PATCH] Renamed gsemet theme to stibbons theme Signed-off-by: Gaetan Semet --- themes/stibbons.zsh-theme | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 themes/stibbons.zsh-theme diff --git a/themes/stibbons.zsh-theme b/themes/stibbons.zsh-theme new file mode 100644 index 000000000..10a2d94c6 --- /dev/null +++ b/themes/stibbons.zsh-theme @@ -0,0 +1,25 @@ +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +#Customized git status, oh-my-zsh currently does not allow render dirty status before branch +git_custom_status() { + local cb=$(current_branch) + if [ -n "$cb" ]; then + echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" + fi +} + +#RVM and git settings +if [[ -s ~/.rvm/scripts/rvm ]] ; then + RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' +else + if which rbenv &> /dev/null; then + RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' + else + RPS1='$(git_custom_status) $EPS1' + fi +fi + +PROMPT='%{$fg[cyan]%}[%{$fg[yellow]%}%n%{$fg[cyan]%}@%{$fg[yellow]%}%m%{$fg[cyan]%}:%{$fg[magenta]%}%~% %{$fg[cyan]%}]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '