diff --git a/bashcols b/bashcols index afe7c46..10af23d 100755 --- a/bashcols +++ b/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