diff options
Diffstat (limited to 'lib/spectrum.zsh')
-rw-r--r-- | lib/spectrum.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh index b683aca29..312ab2248 100644 --- a/lib/spectrum.zsh +++ b/lib/spectrum.zsh @@ -1,9 +1,9 @@ #! /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/ +# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ -typeset -Ag FX FG BG +typeset -AHg FX FG BG FX=( reset "%{[00m%}" @@ -25,13 +25,13 @@ ZSH_SPECTRUM_TEXT=${ZSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab o # Show all 256 colors with color number function spectrum_ls() { for code in {000..255}; do - print -P -- "$code: %F{$code}$ZSH_SPECTRUM_TEXT%f" + print -P -- "$code: %{$FG[$code]%}$ZSH_SPECTRUM_TEXT%{$reset_color%}" done } # Show all 256 colors where the background is set to specific color function spectrum_bls() { for code in {000..255}; do - print -P -- "$BG[$code]$code: $ZSH_SPECTRUM_TEXT %{$reset_color%}" + print -P -- "$code: %{$BG[$code]%}$ZSH_SPECTRUM_TEXT%{$reset_color%}" done } |