From ef06ff6c8a0d51daec164f614a45e90b0384eb57 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Sat, 4 Feb 2012 17:11:25 +0100 Subject: [PATCH] own prompt, with some vcs_info --- zshrc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index f959fef..5667241 100644 --- a/zshrc +++ b/zshrc @@ -2,7 +2,6 @@ autoload -Uz promptinit promptinit -prompt walters # Set up working dir change event chpwd() { @@ -105,5 +104,20 @@ zstyle ':completion:*' verbose true zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' +autoload -Uz vcs_info +zstyle ':vcs_info:*' enable git hg +zstyle ':vcs_info:*' formats "%F{green}%S%f:%F{blue}%b%f:%F{green}%r%f" + +precmd() { + psvar=() + + vcs_info + RPROMPT="%F{green}%~%f" + [[ -n $vcs_info_msg_0_ ]] && RPROMPT="$vcs_info_msg_0_" +} + +PS1="%B%(?..[%?] )%b%n@%m> " +prompt_opts=(cr percent) + source ~/.aliases