Skip to content

Commit

Permalink
Merge pull request ohmyzsh#3966 from apjanke/fix-spectrum-ls
Browse files Browse the repository at this point in the history
Make spectrum_ls implementation consistent with $FG and spectrum_bls
  • Loading branch information
mcornella committed Dec 13, 2015
2 parents 4d154ab + 0bda651 commit d54d896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/spectrum.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d54d896

Please sign in to comment.