diff --git a/wait-for b/wait-for index 28b9b23..a8367c7 100755 --- a/wait-for +++ b/wait-for @@ -59,10 +59,25 @@ do QUIET=1 shift 1 ;; - -t) + -q-*) + QUIET=0 + echoerr "Unknown option: $1" + usage 1 + ;; + -q*) + QUIET=1 + result=$1 + shift 1 + set -- -"${result#-q}" "$@" + ;; + -t | --timeout) TIMEOUT="$2" shift 2 ;; + -t*) + TIMEOUT="${1#-t}" + shift 1 + ;; --timeout=*) TIMEOUT="${1#*=}" shift 1 @@ -74,7 +89,13 @@ do --help) usage 0 ;; + -*) + QUIET=0 + echoerr "Unknown option: $1" + usage 1 + ;; *) + QUIET=0 echoerr "Unknown argument: $1" usage 1 ;;