1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
0 |
+#! /bin/zsh |
|
1 |
+# A script to make using 256 colors in zsh less painful. |
|
2 |
+# P.C. Shyamshankar <sykora@lucentbeing.com> |
|
3 |
+# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ |
|
4 |
+ |
|
5 |
+typeset -Ag FX FG BG |
|
6 |
+ |
|
7 |
+FX=( |
|
8 |
+ reset "[00m" |
|
9 |
+ bold "[01m" no-bold "[22m" |
|
10 |
+ italic "[03m" no-italic "[23m" |
|
11 |
+ underline "[04m" no-underline "[24m" |
|
12 |
+ blink "[05m" no-blink "[25m" |
|
13 |
+ reverse "[07m" no-reverse "[27m" |
|
14 |
+) |
|
15 |
+ |
|
16 |
+for color in {000..255}; do |
|
17 |
+ FG[$color]="[38;5;${color}m" |
|
18 |
+ BG[$color]="[48;5;${color}m" |
|
19 |
+done |