dotfiles/dotfiles/lib/zsh/spectrum.sh
Ivan Malison 6174990049 Add iterm settings, tweak bootstrap, bump eamcs pointer.
Fix web_start.

Add remote_clipboard server stuff.

Bump .emacs.d pointer and add remote_os_copy alias.

Way better get_cols

Made git sui git suir

move to same sha as yelp branch for .emacs.d

Bump emacs pointer.

simplified default code for remote_clipboard.

Remove unused functions from .functions.

Added things from yelp branch.

yelpify

Added field separator to get_cols.

Lots of refactoring. Added .lib directory. Moved dotfiles that get symlinked to ~ into their own directory. Remove some vim configuration.

Remove oh-my-zsh.
2014-12-20 02:42:24 -08:00

29 lines
764 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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
# Show all 256 colors with color number
function spectrum_ls() {
for code in {000..255}; do
print -P -- "$code: %{$FG[$code]Test%f%}"
done
}