-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
#!/usr/bin/bash
OPTIND=1
while getopts h012 opt; do case "$opt" in
[0-9]) ;;
:|\?)
((--OPTIND <= 0)) && OPTIND=1
printf '%q: parse args failed, near by %q\n' "$0" "${!OPTIND}" >&2
exit 2
esac doneCurrent shellcheck output:
Expected shellcheck output (0|1|2) ;;):
In - line 3:
while getopts h012 opt; do case "$opt" in
^-- SC2213 (warning): getopts specified -h, but it's not handled by this 'case'.
For more information:
https://www.shellcheck.net/wiki/SC2213 -- getopts specified -h, but it's no...
Metadata
Metadata
Assignees
Labels
No labels