summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-07-12 17:29:33 +0200
committerFlorian Pritz <f-p@gmx.at>2009-07-12 17:29:33 +0200
commit8c02fad112bc67c3e2ee04fb45d976dfd7f952e3 (patch)
treef0970a88ea843a15f40eff66bec72c20c9385e8b /.zshrc
parent6aa8407f946977bec7fd5f4050ae4e7f92a4286c (diff)
downloaddotfiles-8c02fad112bc67c3e2ee04fb45d976dfd7f952e3.tar.gz
dotfiles-8c02fad112bc67c3e2ee04fb45d976dfd7f952e3.tar.xz
Revert "use zsh builtin color variables"
This reverts commit 6aa8407f946977bec7fd5f4050ae4e7f92a4286c. linewrap bug came back
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc36
1 files changed, 27 insertions, 9 deletions
diff --git a/.zshrc b/.zshrc
index e509c3e..4eb4118 100644
--- a/.zshrc
+++ b/.zshrc
@@ -22,6 +22,24 @@ export cyan='\e[0;36m'
export CYAN='\e[1;36m'
export NC='\e[0m'
+# these are for use in PROMPT
+fg_green=$'%{\e[0;32m%}'
+fg_blue=$'%{\e[0;34m%}'
+fg_cyan=$'%{\e[0;36m%}'
+fg_red=$'%{\e[0;31m%}'
+fg_brown=$'%{\e[0;33m%}'
+fg_purple=$'%{\e[0;35m%}'
+fg_light_gray=$'%{\e[0;37m%}'
+fg_dark_gray=$'%{\e[1;30m%}'
+fg_light_blue=$'%{\e[1;34m%}'
+fg_light_green=$'%{\e[1;32m%}'
+fg_light_cyan=$'%{\e[1;36m%}'
+fg_light_red=$'%{\e[1;31m%}'
+fg_light_purple=$'%{\e[1;35m%}'
+fg_no_colour=$'%{\e[0m%}'
+fg_white=$'%{\e[1;37m%}'
+fg_black=$'%{\e[0;30m%}'
+
# colors in framebuffer!
if [ "$TERM" = "linux" ]; then
${HOME}/bin/parse_xdefaults.sh
@@ -89,17 +107,17 @@ precmd () {
# this has to be on the edge or you have some spaces in the prompt
# if you have any workaround please tell
if [[ $UID != 0 ]]; then
- local username_color=$fg[blue]
+ local username_color=$fg_blue
else
- local username_color=$fg[red]
+ local username_color=$fg_red
fi
-local host_color=$fg_bold[green]
-local path_color=$fg_bold[blue]
-local gitbranch_color=$fg[magenta]
-local exitcode_color=$fg[red]
-PROMPT="${username_color}$USERNAME${fg[default]}@${host_color}%m${fg[default]}\
-:${path_color}%~${fg[default]} ${gitbranch_color}$(parse_git_branch)${fg[default]}
-${exitcode_color}$EXITCODE${fg[default]}> "
+local host_color=$fg_light_green
+local path_color=$fg_light_blue
+local gitbranch_color=$fg_purple
+local exitcode_color=$fg_red
+PROMPT="${username_color}$USERNAME${fg_no_colour}@${host_color}%m${fg_no_colour}\
+:${path_color}%~${fg_no_colour} ${gitbranch_color}$(parse_git_branch)${fg_no_colour}
+${exitcode_color}$EXITCODE${fg_no_colour}> "
}
## Spelling prompt