From 9893a2a302c54c2bd83e36d74bf869f8ccae528b Mon Sep 17 00:00:00 2001 From: Luca Querella Date: Sat, 26 Nov 2011 01:03:07 +0100 Subject: [PATCH] luca.zsh-theme this commit include my theme (themes/luca.zsh-theme) and a little update of (lib/rvm.zsh) I added ZSH_THEME_RVM_PROMPT_{PREFIX|SUFFIX} analogous to ZSH_THEME_GIT_PROMPT_{PREFIX|SUFFIX} --- lib/rvm.zsh | 2 +- themes/luca.zsh-theme | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 themes/luca.zsh-theme diff --git a/lib/rvm.zsh b/lib/rvm.zsh index 597be1b33..81eca5271 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -1,7 +1,7 @@ # get the name of the branch we are on function rvm_prompt_info() { ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return - echo "($ruby_version)" + echo "$ZSH_THEME_RVM_PROMPT_PREFIX$ruby_version$ZSH_THEME_RVM_PROMPT_SUFFIX" } diff --git a/themes/luca.zsh-theme b/themes/luca.zsh-theme new file mode 100644 index 000000000..b0e9865f8 --- /dev/null +++ b/themes/luca.zsh-theme @@ -0,0 +1,18 @@ +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[green]%}GIT::" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]" +ZSH_THEME_GIT_PROMPT_DIRTY="|✖" +ZSH_THEME_GIT_PROMPT_CLEAN="|✔" + +ZSH_THEME_RVM_PROMPT_PREFIX="[%{$fg[red]%}RVM::" +ZSH_THEME_RVM_PROMPT_SUFFIX="%{$reset_color%}]" + +# Display exitcode on the right when >0 +return_code="%(?..%? ↵)" + +PROMPT=' +[%T] [%n] [%~] $(rvm_prompt_info) $(git_prompt_info) +→ ' + +RPROMPT='' \ No newline at end of file