X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=blobdiff_plain;f=misc%2Fgsu%2Fsubcommand;fp=misc%2Fgsu%2Fsubcommand;h=e1130efce334f19964155e751c580c66026c7eba;hp=a688ed5855c60c47e099b723bf8b060487a7669a;hb=326fb75a856018ff102961a9759a09ac2fb10a28;hpb=45ca1b29b59a43524fb3ad6a013c5705ad3bdbde diff --git a/misc/gsu/subcommand b/misc/gsu/subcommand index a688ed5..e1130ef 100644 --- a/misc/gsu/subcommand +++ b/misc/gsu/subcommand @@ -42,7 +42,7 @@ _gsu_available_commands() _gsu_print_available_commands() {( - local i count + local i count=0 gsu_short_msg "Available commands:" for i in $gsu_cmds; do printf "$i" @@ -216,7 +216,7 @@ _com_help() _gsu_get_command_regex ere="$result" - if test -z "$1"; then + if (($# == 0)); then _gsu_banner_msg 2>&1 _gsu_usage 2>&1 { @@ -355,11 +355,11 @@ gsu_getopts() for ((i=0; i < ${#1}; i++)); do c1=${1:$i:1} c2=${1:$(($i + 1)):1} - result+=" o_$c1" + result+=" o_$c1=" if [[ "$c2" = ":" ]]; then let i++ else - result+="=false" + result+="false" fi done result+="