It looks like Usage returns exit code 0 if it was able to successfully parse args and 1 otherwise. There are two issues here:
It silently convert failed scripts to successful.
It overwrite script exit code 1 with own meaning.
I propose to use some rarely used exit code for arg parsing issues and return script's actual exit code as is (probably makes sense to do the same as other common tools running other tools do - e.g. nice).
It looks like Usage returns exit code 0 if it was able to successfully parse args and 1 otherwise. There are two issues here:
I propose to use some rarely used exit code for arg parsing issues and return script's actual exit code as is (probably makes sense to do the same as other common tools running other tools do - e.g.
nice
).