Skip to content

Commit

Permalink
Merge pull request ohmyzsh#487 from dreur/upstream-spectrum-utility
Browse files Browse the repository at this point in the history
Add utility method to spectrum
  • Loading branch information
robbyrussell committed Jul 23, 2011
2 parents 34f00f3 + cbaa97d commit ae9457d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/spectrum.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ 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: %F{$code}Test%f"
done
}

0 comments on commit ae9457d

Please sign in to comment.