Browse Source

escape sequences so rprompt doesn't mess up

canthiswait 14 years ago
parent
commit
e8ef16570f
1 changed files with 8 additions and 8 deletions
  1. 8 8
      lib/spectrum.zsh

+ 8 - 8
lib/spectrum.zsh

@@ -6,15 +6,15 @@
 typeset -Ag FX FG BG
 typeset -Ag FX FG BG
 
 
 FX=(
 FX=(
-    reset     ""
-    bold      "" no-bold      ""
-    italic    "" no-italic    ""
-    underline "" no-underline ""
-    blink     "" no-blink     ""
-    reverse   "" no-reverse   ""
+    reset     "%{%}"
+    bold      "%{%}" no-bold      "%{%}"
+    italic    "%{%}" no-italic    "%{%}"
+    underline "%{%}" no-underline "%{%}"
+    blink     "%{%}" no-blink     "%{%}"
+    reverse   "%{%}" no-reverse   "%{%}"
 )
 )
 
 
 for color in {000..255}; do
 for color in {000..255}; do
-    FG[$color]="[38;5;${color}m"
-    BG[$color]="[48;5;${color}m"
+    FG[$color]="%{[38;5;${color}m%}"
+    BG[$color]="%{[48;5;${color}m%}"
 done
 done