You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of CLIs with boolean flags have two versions of a flag, e.g. bq --help shows options like --[no]debug_trace, which allows the user to explicitly set either a true or a false value (or leave it to the CLI to use the default, if no flag is specified).
The CLI should error if a user specifies both --nodebug_trace and --debug_trace in the same invocation, and otherwise choose the value for the debug_trace flag as determined by the specified flags.
It would be awesome if argh supported this!
The text was updated successfully, but these errors were encountered:
The default of function's boolean argument test is set at True. So on the command line, if I would like to disable this boolean argument. How do I do it?
If I run
python script.py function
The default value (True) is taken.
If I run
python script.py function --test False
I get this error: error: unrecognized arguments: --test False.
I think argh should provide (automatic) prefixes for boolean arguments e.g. --no-test or --disable-test if test's default is set at True.
python script.py function --disable-test
As far as I know, such functionality does not exist already in argh. But it would be of common use. For example, argh of javascript has this functionality: https://www.npmjs.com/package/argh. I think it would be really great to have this functionality for python's argh.
I think it would make sense to make this configurable to avoid breaking changes and confusion. Not sure on which level and how exactly such configuration would take place.
A lot of CLIs with boolean flags have two versions of a flag, e.g.
bq --help
shows options like--[no]debug_trace
, which allows the user to explicitly set either a true or a false value (or leave it to the CLI to use the default, if no flag is specified).The CLI should error if a user specifies both
--nodebug_trace
and--debug_trace
in the same invocation, and otherwise choose the value for thedebug_trace
flag as determined by the specified flags.It would be awesome if
argh
supported this!The text was updated successfully, but these errors were encountered: