summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-07 20:38:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-07 20:38:51 +0000
commit6985a9fba382cacfa671a325a18fea057467e8b5 (patch)
tree668d8338a71fc4b79597ddc9d4a743373b58067e
parent1663a6319679ee07b78fc8671e12635ebdf7dab5 (diff)
downloadzsh-6985a9fba382cacfa671a325a18fea057467e8b5.tar.gz
zsh-6985a9fba382cacfa671a325a18fea057467e8b5.tar.xz
zsh-6985a9fba382cacfa671a325a18fea057467e8b5.zip
Oliver: 24962: update prompt_oliver_setup with default highlighting
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Prompts/prompt_oliver_setup16
2 files changed, 13 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a50d8df3..09ade9867 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-07  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 24962: Oliver: Functions/Prompts/prompt_oliver_setup:
+	update to use zle_highlight default highlighting.
+
 2008-05-07  Peter Stephenson  <pws@csr.com>
 
 	* 24959: Src/Zle/compresult.c: ^D's in compctl could cause a
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 "$@"