summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-04-09 22:43:23 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-04-09 22:43:23 +0200
commitd2ce1e4371be7b25d53b45418963725e08b04865 (patch)
tree4de9096a57c02678b22237c3740e14e92bfb19b3
parent1858972fdbdbec92a4dd099c016561fc904b3e84 (diff)
Added "colortable" helper function
-rw-r--r--etc/functions/colortable7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/functions/colortable b/etc/functions/colortable
new file mode 100644
index 0000000..4acdf92
--- /dev/null
+++ b/etc/functions/colortable
@@ -0,0 +1,7 @@
+## vim:ft=zsh
+## print a table with all 256 color codes
+
+for i in {0..255}; {
+ printf " %s%-3s" $'\e[38;5;'${i}m $i
+ (( (i+1) % (COLUMNS/4) < 1 )) && echo
+}