summaryrefslogtreecommitdiff
path: root/lib/spectrum.zsh
diff options
context:
space:
mode:
authorDallas Reedy <code@dallasreedy.com>2010-05-07 10:21:27 -0700
committerDallas Reedy <code@dallasreedy.com>2010-05-07 10:21:27 -0700
commit74429549856521ea71fb4a3c9e6be0741f7c86f8 (patch)
tree85b9905066cb652ee607e84a926dfbb859b2f843 /lib/spectrum.zsh
parentf9abe041e2b70217b0d2f5519a51a57854b49857 (diff)
parent7d036913c4476916fe8b0325ea9cd54266787021 (diff)
downloadzsh-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.zsh20
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 "%{%}"
+ 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