From 9be463cd28de6626412ee226abb02e073967274b Mon Sep 17 00:00:00 2001 From: DSIW Date: Wed, 21 Mar 2012 15:48:48 +0100 Subject: [PATCH] Modified theme blinks: added time, return code --- themes/dsiw.zsh-theme | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 themes/dsiw.zsh-theme diff --git a/themes/dsiw.zsh-theme b/themes/dsiw.zsh-theme new file mode 100644 index 000000000..73ce03c15 --- /dev/null +++ b/themes/dsiw.zsh-theme @@ -0,0 +1,22 @@ +# Original from https://github.com/blinks zsh theme + +function _prompt_char() { + if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then + echo "%{%F{blue}%}±%{%f%k%b%}" + else + echo ' ' + fi +} + +local return_code="%(?..%{$fg[red]%}ERR:%?%{$reset_color%})" + +ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{black}%B%F{green}%}]" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +PROMPT='%{%f%k%b%} +%{%K{black}%F{yellow}[%*]%B%F{green}%} %n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{black}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%} +%{%K{black}%}$(_prompt_char)%{%K{black}%} %#%{%f%k%b%} ' + +RPROMPT='${return_code}!%{%B%F{cyan}%}%!%{%f%k%b%}'