argh icon indicating copy to clipboard operation
argh copied to clipboard

Add ability to display long options in usage message

Open mjreed-wbd opened this issue 7 months ago • 1 comments

Is your feature request related to a problem?

I have a command with boolean flags which all have descriptive names, but the default usage message shortens all of them to just their first letters.

Describe the solution you'd like

I would like a way to specify, perhaps with the @arg decorator, that a boolean flag should be listed in the usage message in long form rather than short. It's nice that I can see the long form and my custom description via "--help", but I'd prefer to see the long form also in the short message you get when not providing the required parameters.

Describe alternatives you've considered

The only alternative I've found is throwing away the automatic usage message and writing a custom one. Even if I want to do that, it's not clear how to specify that while using argh, since it's a parameter to argparse's parser constructor rather than add_argument.

mjreed-wbd avatar Jul 25 '24 16:07 mjreed-wbd