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 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.
The text was updated successfully, but these errors were encountered:
$ my-app -h
usage: my-app [-h] [--release-the-nuclear-weapons]
options:
-h, --help show this help message and exit
-r, --release-the-nuclear-weapons False
...while in fact it looks as follows?
$ my-app -h
usage: my-app [-h] [-r]
options:
-h, --help show this help message and exit
-r, --release-the-nuclear-weapons False
As far as I understand, argparse chooses the short version over the long one, so there's no way to affect this from argh apart from disabling the automatic creation of the short version. At the moment it's not possible to disable it. I wonder if that would be a solution to your problem at all: would you prefer to enable only long names as long as they are displayed in the short usage text?
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.
The text was updated successfully, but these errors were encountered: