Checklist
What problem does this solve?
cli -s file.txt and cli file.txt -s should work the same way because having to strictly type the flags before the arguments is annoying. Most unix utils allow flags after arguments so people are used to that pattern and a thing that is obviously a flag shouldn't be interpreted as an argument just because it comes after another argument.
Solution description
cli -s file.txt and cli file.txt -s should work the same way.
cli -s file.txt and cli --foo=bar file.txt -s -v --whatever=something should work the same way.
Describe alternatives you've considered
I've tried switching to other CLI frameworks, but they are all much worse than this except in this aspect.
I've tried frontporting a feature from v1 that reordered arguments manually before parsing them: #1928 (currently using this with a custom fork and replace).
Checklist
What problem does this solve?
cli -s file.txtandcli file.txt -sshould work the same way because having to strictly type the flags before the arguments is annoying. Most unix utils allow flags after arguments so people are used to that pattern and a thing that is obviously a flag shouldn't be interpreted as an argument just because it comes after another argument.Solution description
cli -s file.txtandcli file.txt -sshould work the same way.cli -s file.txtandcli --foo=bar file.txt -s -v --whatever=somethingshould work the same way.Describe alternatives you've considered
I've tried switching to other CLI frameworks, but they are all much worse than this except in this aspect.
I've tried frontporting a feature from v1 that reordered arguments manually before parsing them: #1928 (currently using this with a custom fork and
replace).