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
In the subcommand, the only arg is optional, so I don't want ArgRequiredElseHelp, but the vast majority of other subcommands (in my use case) all benefit from ArgRequiredElseHelp.
I can see this is because it's unset in settings but not g_settings. Should unset_setting do both or should unset_global_setting be added? I'd be happy to PR if I knew which direction to go in.
The text was updated successfully, but these errors were encountered:
You're spot on, and actually in v3 I side step this slightly by using (un)set and (un)set_global and actually differentiating the two. For v2 I think it's going to have to stay as is, because I fear changing it would be breaking change (i.e. if there are people relying the current behaviour).
I'm going to close this, however when v3 is released if this issue pops up please feel free to re-address it.
Affected Version of clap
2.29.4
Expected Behavior Summary
Unsetting a setting that has been made global causes it to not affect the arg or subcommand.
Actual Behavior Summary
The setting still applies.
Sample Code or Link to Sample Code
In the subcommand, the only arg is optional, so I don't want
ArgRequiredElseHelp
, but the vast majority of other subcommands (in my use case) all benefit fromArgRequiredElseHelp
.I can see this is because it's unset in
settings
but notg_settings
. Shouldunset_setting
do both or shouldunset_global_setting
be added? I'd be happy to PR if I knew which direction to go in.The text was updated successfully, but these errors were encountered: