summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-05-14 03:49:22 +0200
committerSebastian Reichel <sre@ring0.de>2012-05-14 03:49:22 +0200
commitc83321674b06f730ccd465ecdf91635272195897 (patch)
treed635b56fd68b7d31c3735b9c4fb1e6ae85f75310
parent6470670aa050e6f73014f3ef12bc8488ff42e580 (diff)
downloadzsh-config-c83321674b06f730ccd465ecdf91635272195897.tar.bz2
move zsh/svn/cvs/bzr/hg to left prompt
-rw-r--r--zshrc21
1 files 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 >/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