bash: factor out colortest into separate script

This commit is contained in:
Fernando Schauenburg 2020-12-26 02:19:14 +01:00
parent 4df02f2b0f
commit 76435a29bc
2 changed files with 11 additions and 12 deletions

View file

@ -402,18 +402,6 @@ styletest() {
printf "$(tput invis)This text has the invisible attribute.${Reset}\n"
}
# Print all 256 colors
colortest() {
local i j
for i in $(seq 0 15); do
for j in $(seq 0 15); do
local n=$(( 16 * i + j ))
printf "$(tput setab $n) %3d " $n
done
echo "$Reset"
done
}
##############################################################################
# Run external customizations
##############################################################################

View file

@ -0,0 +1,11 @@
#!/bin/sh
# Print all 256 colors
for i in $(seq 0 15); do
for j in $(seq 0 15); do
n=$(( 16 * i + j ))
printf '%s %3d ' "$(tput setab $n)" "$n"
done
printf '%s\n' "$(tput sgr0)"
done