Browse code

escape sequences so rprompt doesn't mess up

canthiswait authored on 27/04/2010 at 05:01:41
Showing 1 changed files
... ...
@@ -6,15 +6,15 @@
6 6
 typeset -Ag FX FG BG
7 7
 
8 8
 FX=(
9
-    reset     ""
10
-    bold      "" no-bold      ""
11
-    italic    "" no-italic    ""
12
-    underline "" no-underline ""
13
-    blink     "" no-blink     ""
14
-    reverse   "" no-reverse   ""
9
+    reset     "%{%}"
10
+    bold      "%{%}" no-bold      "%{%}"
11
+    italic    "%{%}" no-italic    "%{%}"
12
+    underline "%{%}" no-underline "%{%}"
13
+    blink     "%{%}" no-blink     "%{%}"
14
+    reverse   "%{%}" no-reverse   "%{%}"
15 15
 )
16 16
 
17 17
 for color in {000..255}; do
18
-    FG[$color]="[38;5;${color}m"
19
-    BG[$color]="[48;5;${color}m"
18
+    FG[$color]="%{[38;5;${color}m%}"
19
+    BG[$color]="%{[48;5;${color}m%}"
20 20
 done