-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Checklist
- Are you running the latest v3 release? The list of releases is here.
- Did you check the manual for your release? The v3 manual is here.
- Did you perform a search about this feature? Here's the GitHub guide about searching.
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).