show-colors: no need for wonky syntax

master
an 2019-08-15 23:38:54 -04:00
parent 723a1072af
commit 980b80fc9f
1 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ function show-colors -d "Displays all of the terminal colors"
set name name$mode
printf "Mode %2d: " $mode
for bg in 49 (seq 40 47)
echo -n \e"[$mode;$bg""mlorem"
echo -n \e"[$mode;"$bg"mlorem"
end
echo \e"[0m" \($$name\)
end
@ -46,7 +46,7 @@ function show-colors -d "Displays all of the terminal colors"
echo "4 bit color"
for bg in 49 (seq 40 47)
for fg in 39 (seq 30 37)
echo -n \e"[$mode;$bg;$fg""m$mode;$bg;$fg"
echo -n \e"[$mode;$bg;"$fg"m$mode;$bg;$fg"
end
echo \e"[0m"
end
@ -54,17 +54,17 @@ function show-colors -d "Displays all of the terminal colors"
echo "8 bit color"
for fg in (seq 0 15)
echo -n \e"[48;5;$fg""m "
echo -n \e"[48;5;"$fg"m "
end
echo \e"[0m"
for fg in (seq 232 255)
echo -n \e"[48;5;$fg""m "
echo -n \e"[48;5;"$fg"m "
end
echo \e"[0m"
for fg in (seq 16 231)
echo -n \e"[48;5;$fg""m "
echo -n \e"[48;5;"$fg"m "
test (math \( $fg - 15 \) % 36) -eq 0
and echo \e"[0m"
end
@ -77,7 +77,7 @@ function show-colors -d "Displays all of the terminal colors"
echo "24 bit color"
for fg in $roygcbvp
echo -n \e"[48;2;$fg""m "
echo -n \e"[48;2;"$fg"m "
end
echo \e"[0m"