Merge pull request #2176 from dejanlukan/spectrum
Added the spectrum_bls function, which prints all 256 colors set as the background.
Diff
1diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh
2index 2fdf537ef5e2ea10e1494f4668c01231ba58e1e2..166c942fb90866d577346a712895315b51cf3aff 100644
3--- a/lib/spectrum.zsh
4+++ b/lib/spectrum.zsh
5@@ -26,3 +26,10 @@ function spectrum_ls() {
6 done
7 }
8 9+# Show all 256 colors where the background is set to specific color
10+function spectrum_bls() {
11+ for code in {000..255}; do
12+ ((cc = code + 1))
13+ print -P -- "$BG[$code]$code: Test %{$reset_color%}"
14+ done
15+}