replace shebang with vim modeline, improve syntax
This commit is contained in:
8
bashcols
8
bashcols
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
# vim: syntax=bash:
|
||||
|
||||
eval "reset_esc=\"\\e[0m\""
|
||||
|
||||
@@ -9,9 +9,9 @@ function colout() {
|
||||
return
|
||||
fi
|
||||
|
||||
local color=$1
|
||||
local color="$1"
|
||||
shift
|
||||
tput setaf $color
|
||||
tput setaf "$color"
|
||||
"$@"
|
||||
tput sgr0
|
||||
}
|
||||
@@ -37,7 +37,7 @@ function defcol() {
|
||||
function dispcollist() {
|
||||
local width=${1:-16}
|
||||
local idx=0
|
||||
for colid in `seq 1 256`; do
|
||||
for colid in {1..256}; do
|
||||
colout $colid printf "%3s " $colid
|
||||
idx=$(($idx+1))
|
||||
if [[ $(($idx % $width)) -eq 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user