From 5b7b5bc9d10b37e36e0c899419abf2cd03fe1dac Mon Sep 17 00:00:00 2001 From: canthiswait Date: Mon, 26 Apr 2010 16:02:19 -0700 Subject: [PATCH] Added scpectrum script for easy 256 color theaming --- lib/spectrum.zsh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/spectrum.zsh diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh new file mode 100644 index 0000000..4864654 --- /dev/null +++ b/lib/spectrum.zsh @@ -0,0 +1,20 @@ +#! /bin/zsh +# A script to make using 256 colors in zsh less painful. +# P.C. Shyamshankar +# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ + +typeset -Ag FX FG BG + +FX=( + reset "" + bold "" no-bold "" + italic "" no-italic "" + underline "" no-underline "" + blink "" no-blink "" + reverse "" no-reverse "" +) + +for color in {000..255}; do + FG[$color]="[38;5;${color}m" + BG[$color]="[48;5;${color}m" +done