From b38b149587c7ae52f61f04b137cac41e999b3dfd Mon Sep 17 00:00:00 2001 From: Jesper Kjeldgaard Date: Tue, 12 Apr 2011 20:08:43 +0100 Subject: [PATCH] Added a theme with the following layout: hostname:path [git status if any] $ command command... ruby version --- themes/thejspr.zsh-theme | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 themes/thejspr.zsh-theme diff --git a/themes/thejspr.zsh-theme b/themes/thejspr.zsh-theme new file mode 100644 index 000000000..ba835ba62 --- /dev/null +++ b/themes/thejspr.zsh-theme @@ -0,0 +1,15 @@ +# get ruby version from either rvm or system ruby. +if [[ -s ~/.rvm/scripts/rvm ]] ; then + RPS1="%{%}%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v g)%{$reset_color%}" +else + RPS1="%{$fg[red]%}\$(ruby -e 'print RUBY_VERSION')%{$reset_color%} $EPS1" +fi + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$fg[white]%}%B$%b " + +local host_name='%{$fg[white]%}%m%{$reset_color%}:' +local current_dir='%{$fg[blue]%}%~%{$reset_color%}' +local git_branch='$(git_prompt_info)%{$reset_color%}' + +PROMPT="${host_name}${current_dir}${git_branch}"