Browse code

Add utility method to spectrum

Benjamin Boudreau authored on 23/07/2011 at 14:42:43
Showing 1 changed files
... ...
@@ -18,3 +18,11 @@ for color in {000..255}; do
18 18
     FG[$color]="%{[38;5;${color}m%}"
19 19
     BG[$color]="%{[48;5;${color}m%}"
20 20
 done
21
+
22
+# Show all 256 colors with color number
23
+function spectrum_ls() {
24
+  for code in {000..255}; do
25
+    print -P -- "$code: %F{$code}Test%f"
26
+  done
27
+}
28
+