summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2009-05-31 23:40:48 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2009-05-31 23:40:48 +0000
commit9b19b5b9a1aae828101c901eee39491765ea4603 (patch)
tree905fa886d6af4b52d00953c3cd6f33f3ede74186 /zshrc
parentc45263f911ca95c84af86643acb99b870e9f475b (diff)
Work on vcsinfo
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@397 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc16
1 files changed, 10 insertions, 6 deletions
diff --git a/zshrc b/zshrc
index ca56e5e..03e9fc3 100644
--- a/zshrc
+++ b/zshrc
@@ -273,6 +273,9 @@ case $TERM in
function build-and-update-title() { }
fi
;;
+ *)
+ function build-and-update-title() { }
+ ;;
esac
function precmd() {
@@ -294,13 +297,13 @@ zstyle ':vcs_info:*' use_simple
function init-prompt() {
# init colors:
+ setopt PROMPTSUBST
autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
colors
fi
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
- eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
- eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
+ eval PR_$color='%{$fg[${(L)color}]%}'
(( count = $count + 1 ))
done
@@ -308,6 +311,7 @@ function init-prompt() {
debian_chroot=$(cat /etc/debian_chroot)
fi
+ PR_BOLD="%{$terminfo[bold]%}"
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
# change vcs_info formats for the prompt
if [[ "$TERM" == dumb ]] ; then
@@ -315,16 +319,16 @@ function init-prompt() {
zstyle ':vcs_info:*' formats "(%s%)-[%b] "
else
# these are the same, just with a lot of colours:
- zstyle ':vcs_info:*' actionformats "${PR_YELLOW}(${PR_NO_COLOUR}%s${PR_YELLOW})${PR_CYAN}-${PR_YELLOW}[${PR_GREEN}%b${PR_YELLOW}|${PR_RED}%a${PR_YELLOW}]${PR_NO_COLOUR}"
- zstyle ':vcs_info:*' formats "${PR_YELLOW}(${PR_NO_COLOUR}%s${PR_YELLOW})${PR_CYAN}-${PR_YELLOW}[${PR_GREEN}%b${PR_YELLOW}]${PR_NO_COLOUR}"
+ zstyle ':vcs_info:*' actionformats "${PR_YELLOW}[${PR_CYAN}%s${PR_YELLOW}|${PR_GREEN}%b${PR_YELLOW}|${PR_RED}%a${PR_YELLOW}]${PR_NO_COLOUR} "
+ zstyle ':vcs_info:*' formats "${PR_YELLOW}[${PR_CYAN}%s${PR_YELLOW}|${PR_GREEN}%b${PR_YELLOW}]${PR_NO_COLOUR} "
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat "%b${PR_RED}:${YELLOW}%r"
fi
if [ "`id -u`" = "0" -o ! -x /usr/bin/id ] ; then
- export PROMPT="${debian_chroot:+[$debian_chroot] }%n@%m${vcs_info_msg_0_}:%~# "
+ export PROMPT='${debian_chroot:+[$debian_chroot] }${vcs_info_msg_0_}%n@%m:%~# '
export TITLE="%n@%m: %~"
else
- export PROMPT="${debian_chroot:+[$debian_chroot] }%n@%m${vcs_info_msg_0_}:%~$ "
+ export PROMPT='${debian_chroot:+[$debian_chroot] }${vcs_info_msg_0_}%n@%m:%~$ '
export TITLE="%n@%m: %~"
fi
}