diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2008-05-17 22:42:16 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-05-17 22:42:16 +0000 |
| commit | c894f695cc02f16af429c7506bb78354dcd9a1e3 (patch) | |
| tree | 315daebee1a9ebc507790baf516863b0ff450f66 /Functions/Prompts/prompt_oliver_setup | |
| parent | 25095: thorough modernization of prompt theme system (diff) | |
| download | zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.gz zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.bz2 zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.lz zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.xz zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.zst zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.zip | |
25095: thorough modernization of prompt theme system
Diffstat (limited to 'Functions/Prompts/prompt_oliver_setup')
| -rw-r--r-- | Functions/Prompts/prompt_oliver_setup | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Functions/Prompts/prompt_oliver_setup b/Functions/Prompts/prompt_oliver_setup index f7c4c7e5a..44d3f99ae 100644 --- a/Functions/Prompts/prompt_oliver_setup +++ b/Functions/Prompts/prompt_oliver_setup @@ -24,18 +24,18 @@ prompt_oliver_setup() { [[ "${(t)pcolour}" != assoc* ]] && typeset -Ag pcolour [[ "${(t)tcolour}" != assoc* ]] && typeset -Ag tcolour local pcol=${1:-${pcolour[${HOST:=`hostname`}]:-bold}} - local pcolr=$fg[${pcol#bold}] + local pcolr="%F{${${pcol#bold}:-default}}" [[ $pcol = bold* ]] && pcolr=%B$pcolr - + local tcol=${2:-${tcolour[$HOST]}} - local tcolr="fg=${tcol#bold}" + local tcolr="fg=${${tcol#bold}:-default}" [[ $tcol = bold* ]] && tcolr=bold,$tcolr - + local a host="%m:" user="%n " [[ $HOST == (${(j(|))~normal_hosts}) ]] && host="" [[ $LOGNAME == (root|${(j(|))~normal_users}) ]] && user="" - PS1="%{$pcolr%}$user$host%~%"'$((COLUMNS-12))'"(l.$prompt_newline. )[%h%1(j.%%%j.)%0(?..:%?)]%# %{$reset_color%}" RPS2='<%^' + PS1="$pcolr$user$host%~%"'$((COLUMNS-12))'"(l.$prompt_newline. )[%h%1(j.%%%j.)%0(?..:%?)]%# %b%f%k" RPS2='<%^' PS2='' zle_highlight[(r)default:*]=default:$tcolr } |
