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
d54d8963
Commit
d54d8963
authored
Dec 13, 2015
by
Marc Cornellà
Browse files
Merge pull request #3966 from apjanke/fix-spectrum-ls
Make spectrum_ls implementation consistent with $FG and spectrum_bls
parents
4d154aba
0bda651d
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/spectrum.zsh
View file @
d54d8963
...
...
@@ -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
}
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