bash-argsparse
bash-argsparse copied to clipboard
Allow requiring that options precede parameters
GNU getopt, at least, provides multiple "scanning modes" that affect how it parses interleaved options and parameters. This PR exposes the choice to an application using the argsparse library.
This can be useful in implementing commands with subcommands, where the order of arguments matters. For example, status quo could not distinguish git -p log from git log -p, even with two invocations of argsparse.