summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2013-04-21 19:46:51 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2013-04-21 19:46:51 +0000
commit239f684d2652db805833bcda5fe8ef8b6f5597e8 (patch)
treee17670828949938c5d91b42d879a7430bf081f77 /zshrc
parent86301e3198d34a706bfa16cbae5977b926269537 (diff)
Move colorstuff out of init-prompt
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@619 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc27
1 files changed, 14 insertions, 13 deletions
diff --git a/zshrc b/zshrc
index 09b2f2c..3288fb7 100644
--- a/zshrc
+++ b/zshrc
@@ -79,6 +79,20 @@ setopt \
HIST_FIND_NO_DUPS \
HIST_IGNORE_SPACE \
+# 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='%{$fg[${(L)color}]%}'
+ (( count = $count + 1 ))
+done
+PR_BOLD="%{$terminfo[bold]%}"
+PR_NO_COLOUR="%{$terminfo[sgr0]%}"
+
+
# in 'foo bar | baz' make a second ^W not eat 'bar |', but only '|'
# this has the disadvantage that in 'bar|baz' it eats all of it.
typeset WORDCHARS='|'$WORDCHARS
@@ -324,23 +338,10 @@ 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='%{$fg[${(L)color}]%}'
- (( count = $count + 1 ))
- done
-
if [ -e /etc/debian_chroot ]; then
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
zstyle ':vcs_info:*' actionformats "(%s%)-[%b|%a] "