summaryrefslogtreecommitdiff
path: root/11_Colors.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-02-05 16:32:14 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-02-05 16:32:14 +0100
commitaf9c1de40bff87ae6ccc9430c364f7e18990dca8 (patch)
tree970a28c3db617d272c7a34aea2a6399030a2a4cb /11_Colors.zsh
parent08f3029fe7b17c0bc85b766b2a2f605ccc54e71b (diff)
[Colors] better initialization of colors + sudo user color
Diffstat (limited to '11_Colors.zsh')
-rw-r--r--11_Colors.zsh20
1 files changed, 1 insertions, 19 deletions
diff --git a/11_Colors.zsh b/11_Colors.zsh
index 3debc13..d50b4e5 100644
--- a/11_Colors.zsh
+++ b/11_Colors.zsh
@@ -24,6 +24,7 @@ typeset -A prompt_colors git_colors mail_colors correct_colors battery_colors da
PS1_ROOT=${PS1_ROOT:-$color[red]}
PS1_USER=${PS1_USER:-$color[blue]}
+PS1_SUDO=${PS1_SUDO:-$color[green]}
PS1_USER_SSH=${PS1_USER_SSH:-$color[magenta]}
PS1_USER_SCR=${PS1_USER_SCR:-$color[cyan]}
@@ -33,23 +34,6 @@ PS1_USER_SCR=${PS1_USER_SCR:-$color[cyan]}
#
set_prompt_colors ()
{
- prompt_colors[generic]=`print -Pn "%(! $PS1_ROOT $PS1_USER)"`
-
- if normal_user
- then
- if ( [ "$SSH_TTY" != "" ] )
- then
- # This allows us to easily distinguish shells
- # which really are on the local machine or not.
- # That's so good, use it ! :-)
- prompt_colors[generic]=${PS1_USER_SSH:-$prompt_colors[generic]}
- fi
- if ( [ "$TERM" = "screen" ] )
- then
- prompt_colors[generic]=${PS1_USER_SCR:-$prompt_colors[generic]}
- fi
- fi
-
local my_generic
my_generic=${1:-$prompt_colors[generic]}
prompt_colors[bold_generic]="$my_generic;$color[bold]" ## Always bold generic color
@@ -97,8 +81,6 @@ set_prompt_colors ()
git_colors[up_to_date]="$prompt_colors[up_to_date]" # git up-to-date
}
-set_prompt_colors
-
correct_colors[error]="$color[red];$color[bold]"
correct_colors[suggest]="$color[blue];$color[bold]"