replace shebang with vim modeline, improve syntax

This commit is contained in:
Micyp
2021-01-13 19:17:58 +01:00
parent 6dbb80d10f
commit 4cf9387cb8

View File

@@ -1,4 +1,4 @@
#!/bin/bash # vim: syntax=bash:
eval "reset_esc=\"\\e[0m\"" eval "reset_esc=\"\\e[0m\""
@@ -9,9 +9,9 @@ function colout() {
return return
fi fi
local color=$1 local color="$1"
shift shift
tput setaf $color tput setaf "$color"
"$@" "$@"
tput sgr0 tput sgr0
} }
@@ -37,7 +37,7 @@ function defcol() {
function dispcollist() { function dispcollist() {
local width=${1:-16} local width=${1:-16}
local idx=0 local idx=0
for colid in `seq 1 256`; do for colid in {1..256}; do
colout $colid printf "%3s " $colid colout $colid printf "%3s " $colid
idx=$(($idx+1)) idx=$(($idx+1))
if [[ $(($idx % $width)) -eq 0 ]]; then if [[ $(($idx % $width)) -eq 0 ]]; then