about summary refs log tree commit diff
path: root/Functions/Prompts/prompt_elite_setup
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-06-14 16:10:50 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-06-14 16:10:50 +0000
commit88301c1c7389fc81683fbdd5168f8db82e46e66b (patch)
treeea957d75f9dbf67ff0e91502f0925f40124eb027 /Functions/Prompts/prompt_elite_setup
parent2bd5223d5c091dce8f5048d1a49d11581cba8aa4 (diff)
downloadzsh-88301c1c7389fc81683fbdd5168f8db82e46e66b.tar.gz
zsh-88301c1c7389fc81683fbdd5168f8db82e46e66b.tar.xz
zsh-88301c1c7389fc81683fbdd5168f8db82e46e66b.zip
users/11568: use UTF-8 characters in some prompt themes
Diffstat (limited to 'Functions/Prompts/prompt_elite_setup')
-rw-r--r--Functions/Prompts/prompt_elite_setup11
1 files changed, 6 insertions, 5 deletions
diff --git a/Functions/Prompts/prompt_elite_setup b/Functions/Prompts/prompt_elite_setup
index 53216c52a..89e9bffdf 100644
--- a/Functions/Prompts/prompt_elite_setup
+++ b/Functions/Prompts/prompt_elite_setup
@@ -11,8 +11,9 @@ This prompt is color-scheme-able.  You can invoke it thus:
 The default colors are red and blue respectively.  This theme is
 intended for use with a black background.
 
-Recommended fonts for this theme: nexus or vga or similar.  If you
-don't have any of these, the 8-bit characters will probably look stupid.
+Recommended fonts for this theme: either UTF-8, or nexus or vga or similar.
+If you don't have any of these, the 8-bit characters will probably look
+stupid.
 EOH
 }
 
@@ -20,9 +21,9 @@ prompt_elite_setup () {
   local text=${1:-'red'}
   local punctuation=${2:-'blue'}
 
-  for code in 332 304 371 372 300; do
-    local char_$code=$(echo -n "\\0$code")
-  done
+  local char_333 char_262 char_261 char_260
+  autoload -U prompt_special_chars
+  prompt_special_chars
 
   PS1="%{$fg[$text]%}$char_332$char_304%{$fg[$punctuation]%}(%{$fg[$text]%}%n%{$fg[$punctuation]%}@%{$fg[$text]%}%m%{$fg[$punctuation]%})%{$fg[$text]%}-%{$fg[$punctuation]%}(%{$fg[$text]%}%D{%I:%M%P}%{$fg[$punctuation]%}-:-%{$fg[$text]%}%D{%m}%{$fg[$punctuation]$fg[$text]%}/%D{%d}%{$fg[$punctuation]%})%{$fg[$text]%}$char_304-%{$fg[$punctuation]]%}$char_371%{$fg[$text]%}-$char_371$char_371%{$fg[$punctuation]%}$char_372$prompt_newline%{$fg[$text]%}$char_300$char_304%{$fg[$punctuation]%}(%{$fg[$text]%}%1~%{$fg[$punctuation]%})%{$fg[$text]%}$char_304$char_371%{$fg[$punctuation]%}$char_372%{$reset_color%}"
   PS2="> "