Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
94a5cc5c
Commit
94a5cc5c
authored
Dec 31, 2013
by
LFDM
Committed by
Phil Eichinger
Mar 25, 2014
Browse files
Updates spectrum.zsh
parent
732bca07
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/spectrum.zsh
View file @
94a5cc5c
...
@@ -19,17 +19,19 @@ for color in {000..255}; do
...
@@ -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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment