bash: factor out colortest into separate script
This commit is contained in:
parent
4df02f2b0f
commit
76435a29bc
2 changed files with 11 additions and 12 deletions
|
@ -402,18 +402,6 @@ styletest() {
|
||||||
printf "$(tput invis)This text has the invisible attribute.${Reset}\n"
|
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
|
# Run external customizations
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
11
roles/dotfiles/files/bin/colortest
Executable file
11
roles/dotfiles/files/bin/colortest
Executable 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
|
||||||
|
|
Loading…
Add table
Reference in a new issue