diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-09 22:43:23 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-09 22:43:23 +0200 |
commit | d2ce1e4371be7b25d53b45418963725e08b04865 (patch) | |
tree | 4de9096a57c02678b22237c3740e14e92bfb19b3 /etc/functions/colortable | |
parent | 1858972fdbdbec92a4dd099c016561fc904b3e84 (diff) |
Added "colortable" helper function
Diffstat (limited to 'etc/functions/colortable')
-rw-r--r-- | etc/functions/colortable | 7 |
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 +} |