bash-argsparse icon indicating copy to clipboard operation
bash-argsparse copied to clipboard

Allow requiring that options precede parameters

Open djpohly opened this issue 8 months ago • 0 comments

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.

djpohly avatar Jun 11 '25 22:06 djpohly