-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Triage: Problems with negating boolean options #939
Copy link
Copy link
Closed
Description
People have a variety of problems with boolean options and negating. Opened this issue to collect the related issues found during triage.
NB: there is an open pull request and I have not yet looked at how well it addresses the issues, but likely to be some documentation work even if functionally solid.
Issues:
- On and off switches are not working #108 On and off switches are not working
- when specifying options, the "--no" version of a flag must appear after the flag #238 when specifying options, the "--no" version of a flag must appear after the flag
- Defining boolean options via Command#option() defaults to undefined, not false. #574 Defining boolean options via Command#option() defaults to undefined, not false.
- Command.opts() values are always undefined #626 Command.opts() values are always undefined
- No way to know if parameter is set with --no- options #630 No way to know if parameter is set with --no- options
- Support defaults for boolean options (including --no-*), for env var set defaults #928 Support defaults for boolean options (including --no-*), for env var set defaults
- Adding negative option makes Commander.js to return "true" when option is not specified #979 Adding negative option makes Commander.js to return "true" when option is not specified
Pull Requests:
- fixes behavior of --no-* options #795 fixes behavior of --no-* options
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels