ignore unknown arguments that don't start with a "-"

This commit is contained in:
Jérémy Lecour 2019-03-13 16:50:26 +01:00 committed by Jérémy Lecour
parent c9c061f811
commit b8b94a66ce

View file

@ -333,13 +333,14 @@ while :; do
shift shift
break break
;; ;;
-?*) -?*|[[:alnum:]]*)
# ignore unknown options # ignore unknown options
printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2 printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2
;; ;;
*) *)
# Default case: If no more options then break out of the loop. # Default case: If no more options then break out of the loop.
break break
;;
esac esac
shift shift