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
I want to add a --long-help flag (with -H shortcut) that will show a longer help.
This could easily be done with support for marking additional help flags or by letting the user choose a set of flags and shorthands to use for help.
I'd have to parse the flags separately and set the help flag programmatically whenever I find a -H or --long-help flag. I have tried to work around this with a 'persistent run' structure but it is just too much code and doesn't work when PositionalArgs that requires a minimum number of arguments is in use.
There wasn't much traction on this issue and its quite old. Going to close as part of #1600 but if this is still something you struggle with feel free to reopen.
If I understand you correctly, you just want the ability to mark other flags so they have the same high priority as the existing --help which will short circuit other logic. If its not still an issue, disregard my question.
I want to add a --long-help flag (with -H shortcut) that will show a longer help.
This could easily be done with support for marking additional help flags or by letting the user choose a set of flags and shorthands to use for help.
I'd have to parse the flags separately and set the help flag programmatically whenever I find a -H or --long-help flag. I have tried to work around this with a 'persistent run' structure but it is just too much code and doesn't work when PositionalArgs that requires a minimum number of arguments is in use.
See:
cobra/command.go
Lines 694 to 696 in 4dab30c
The text was updated successfully, but these errors were encountered: