1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-13 09:20:09 +00:00

Merge pull request #2390 from LFDM/updating_spectrum

Updates and refactors spectrum.zsh
This commit is contained in:
Robby Russell 2014-03-23 11:39:07 -07:00
commit 27965fedec

View file

@ -19,17 +19,19 @@ for color in {000..255}; do
BG[$color]="%{[48;5;${color}m%}" BG[$color]="%{[48;5;${color}m%}"
done done
ZSH_SPECTRUM_TEXT=${ZSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab oris}
# Show all 256 colors with color number # Show all 256 colors with color number
function spectrum_ls() { function spectrum_ls() {
for code in {000..255}; do for code in {000..255}; do
print -P -- "$code: %F{$code}Test%f" print -P -- "$code: %F{$code}$ZSH_SPECTRUM_TEXT%f"
done done
} }
# Show all 256 colors where the background is set to specific color # Show all 256 colors where the background is set to specific color
function spectrum_bls() { function spectrum_bls() {
for code in {000..255}; do for code in {000..255}; do
((cc = code + 1)) print -P -- "$BG[$code]$code: $ZSH_SPECTRUM_TEXT %{$reset_color%}"
print -P -- "$BG[$code]$code: Test %{$reset_color%}"
done done
} }