Changed default argparse option to break, rather than exit; to support required argument(s) without an associated flag

This commit is contained in:
Alex Paarfus
2023-06-27 23:22:13 -04:00
parent d76ab3ae0b
commit 010d171254
3 changed files with 3 additions and 15 deletions

View File

@@ -56,11 +56,7 @@ main() {
-h | --help ) usage; return 0;;
-q | --quality ) quality="${2}"; shift;;
-- ) shift; break;;
* )
printf '%s\n' "Unknown option: '${1}'" >&2
usage
return 1
;;
* ) break;;
esac
shift
done