From 6985a9fba382cacfa671a325a18fea057467e8b5 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 7 May 2008 20:38:51 +0000 Subject: Oliver: 24962: update prompt_oliver_setup with default highlighting --- Functions/Prompts/prompt_oliver_setup | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Functions') diff --git a/Functions/Prompts/prompt_oliver_setup b/Functions/Prompts/prompt_oliver_setup index a94fc07c7..f7c4c7e5a 100644 --- a/Functions/Prompts/prompt_oliver_setup +++ b/Functions/Prompts/prompt_oliver_setup @@ -23,21 +23,21 @@ prompt_oliver_setup() { [[ "${(t)pcolour}" != assoc* ]] && typeset -Ag pcolour [[ "${(t)tcolour}" != assoc* ]] && typeset -Ag tcolour - local pcol=${1:-${pcolour[${HOST:=`hostname`}]:-yellow}} + local pcol=${1:-${pcolour[${HOST:=`hostname`}]:-bold}} local pcolr=$fg[${pcol#bold}] - [[ $pcol = bold* ]] && pcolr=$bold_color$pcolr + [[ $pcol = bold* ]] && pcolr=%B$pcolr - local tcol=${2:-${tcolour[$HOST]:-white}} - local tcolr=$reset_color$fg[${tcol#bold}] - [[ $tcol = bold* ]] && tcolr=$tcolr$bold_color + local tcol=${2:-${tcolour[$HOST]}} + local tcolr="fg=${tcol#bold}" + [[ $tcol = bold* ]] && tcolr=bold,$tcolr local a host="%m:" user="%n " [[ $HOST == (${(j(|))~normal_hosts}) ]] && host="" - [[ ${USER:-`whoami`} == (root|${(j(|))~normal_users}) ]] && user="" + [[ $LOGNAME == (root|${(j(|))~normal_users}) ]] && user="" - PS1="%{$pcolr%}$user$host%~%"'$((COLUMNS-12))'"(l.$prompt_newline. )[%h%1(j.%%%j.)%0(?..:%?)]%# %{$tcolr%}" - RPS2='<%^' + PS1="%{$pcolr%}$user$host%~%"'$((COLUMNS-12))'"(l.$prompt_newline. )[%h%1(j.%%%j.)%0(?..:%?)]%# %{$reset_color%}" RPS2='<%^' PS2='' + zle_highlight[(r)default:*]=default:$tcolr } prompt_oliver_setup "$@" -- cgit 1.4.1