From c83321674b06f730ccd465ecdf91635272195897 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Mon, 14 May 2012 03:49:22 +0200 Subject: move zsh/svn/cvs/bzr/hg to left prompt --- zshrc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/zshrc b/zshrc index 567ac2c..4119c40 100644 --- a/zshrc +++ b/zshrc @@ -28,10 +28,10 @@ NORM="%{"$'\033[00m'"%}" # %m = Hostname # %~ = Current Directory # %# = Shell Icon % for User, # for root -PROMPT="${GREEN}%n@%m ${BLUE}%~ %# ${NORM}" +PROMPT="${GREEN}%n@%m ${BLUE}%~ "'${vcs_info_msg_0_}'"${BLUE}%# ${NORM}" -# VCS prompt on the right side -RPROMPT=$'$(vcs_info_wrapper)' +# continued prompt +PROMPT2="${BLUE}%_> ${NORM}" # enable color in some commands eval "`dircolors -b`" @@ -102,12 +102,6 @@ background() { $1 $2 /dev/null 2>&1 &! } -# get vcs info for the prompt -vcs_info_wrapper() { - vcs_info - echo "${vcs_info_msg_0_}" -} - CHPWD_PROFILE='default' function chpwd_profiles() { local -x profile @@ -123,7 +117,10 @@ function chpwd_profiles() { chpwd_functions=( ${chpwd_functions} chpwd_profiles ) # update title -function precmd { title "%n@%m %~" } +function precmd { + vcs_info + title "%n@%m %~" +} # menus for mutt and less zstyle ':completion:*:*:less:*' menu yes select @@ -138,9 +135,9 @@ zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # VCS Info zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' -zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f ' +zstyle ':vcs_info:*' formats '%F{5}[%F{2}%b%F{5}]%f ' zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' -zstyle ':vcs_info:*' enable git cvs svn +zstyle ':vcs_info:*' enable bzr git hg svn # tinyos directory specific configuration zstyle ':chpwd:profiles:/home/sre/src/tinyos(|/|/*)' profile tinyos -- cgit v1.2.3