Negative switches
Open
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
My project has a use case for negative switch flags. E.g:
--action // Sets args.action to true
--noaction // Sets args.action to false
Yes, we could add the two flags ourselves, but then we'd have to handle the parsing logic and possibility of conflicts manually, and we'd have to implement it for every switch or else be inconsistent in our UX.
I would rather see a negative flag added as part of the macro for the switch type automatically, and have integrated checks to ensure the positive and negative aren't both included.
Contributor guide
Assessment
This issue has not been assessed yet.