From f057737e57b3e3acbd32614b4f4f03103ce764aa Mon Sep 17 00:00:00 2001 From: dejan Date: Wed, 16 Oct 2013 12:36:48 +0200 Subject: [PATCH] Added the spectrum_bls function, which prints all 256 colors set as the background. We can easily see which color we want to set when changing the PS1 shell variable, since the colors are more distinctive. --- lib/spectrum.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh index 2fdf537e..166c942f 100644 --- a/lib/spectrum.zsh +++ b/lib/spectrum.zsh @@ -26,3 +26,10 @@ function spectrum_ls() { done } +# Show all 256 colors where the background is set to specific color +function spectrum_bls() { + for code in {000..255}; do + ((cc = code + 1)) + print -P -- "$BG[$code]$code: Test %{$reset_color%}" + done +}