diff options
author | Dallas Reedy <code@dallasreedy.com> | 2010-05-07 10:21:27 -0700 |
---|---|---|
committer | Dallas Reedy <code@dallasreedy.com> | 2010-05-07 10:21:27 -0700 |
commit | 74429549856521ea71fb4a3c9e6be0741f7c86f8 (patch) | |
tree | 85b9905066cb652ee607e84a926dfbb859b2f843 /lib/spectrum.zsh | |
parent | f9abe041e2b70217b0d2f5519a51a57854b49857 (diff) | |
parent | 7d036913c4476916fe8b0325ea9cd54266787021 (diff) | |
download | zsh-74429549856521ea71fb4a3c9e6be0741f7c86f8.tar.gz zsh-74429549856521ea71fb4a3c9e6be0741f7c86f8.tar.bz2 zsh-74429549856521ea71fb4a3c9e6be0741f7c86f8.zip |
Merge remote branch 'robbyrussell/master'
Diffstat (limited to 'lib/spectrum.zsh')
-rw-r--r-- | lib/spectrum.zsh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh new file mode 100644 index 000000000..4006a7fe1 --- /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 <sykora@lucentbeing.com> +# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ + +typeset -Ag FX FG BG + +FX=( + reset "%{[00m%}" + bold "%{[01m%}" no-bold "%{[22m%}" + italic "%{[03m%}" no-italic "%{[23m%}" + underline "%{[04m%}" no-underline "%{[24m%}" + blink "%{[05m%}" no-blink "%{[25m%}" + reverse "%{[07m%}" no-reverse "%{[27m%}" +) + +for color in {000..255}; do + FG[$color]="%{[38;5;${color}m%}" + BG[$color]="%{[48;5;${color}m%}" +done |