-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regroup "similar" flags/options in the help prompt #2739
Comments
To help understand the use case, how are the flags different if they have the same help message? Or is the flag name meant to be context enough to clarify, like a command dealing with semver versions have |
I mean by the same/unique help message including "or ..." in it like: ... : "Major or Minor or Patch.." I'm building an app with Clap and I'm facing with this kind of "help duplicates" that could be nicer if more compact:
What It Should Be:
|
Some quick thoughts: I'd probably model this after usages to reduce user confusion. The downside is that would look like |
Might not apply in the reporters case but one way of doing this in CLI11 is by having a string parsed at runtime: https://cliutils.github.io/CLI11/book/chapters/flags.html I don't think thats the way we should go but I wanted to make note of how others solve similar problems. |
Please complete the following tasks
Clap Version
3.0.0-beta.2
Describe your use case
Hi everyone,
I just suggest to add a simple feature about the display of the help prompt to regroup flags/options that seem to us "similar" and to simplify the help prompt in order to reduce its length and be more compact.
The function should regroup args and be visualized:
Like this:
Instead of:
Describe the solution you'd like
It could be nice to have a function like this:
And be used like this:
OUTPUT:
The text was updated successfully, but these errors were encountered: