-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add an option to show aliases to --help
#3994
Comments
An alternative solution would be for us to elide more information with |
Most likely any solution would not be automatic but opt-in as some CLI authors very intentionally want some aliases hidden from the user. This means this issue is not as likely to be solved directly because we are making a concerted effort to trim down clap (#1365). Instead of offering a flag for people to tweak individual piece of behavior, we are instead limiting those to the common case and offering the less common cases the building blocks they need to get the behavior they want. In this case, the building block is likely our decoupling of help generation from formatting so users can format it as they wish while still getting a lot of the basics taken care of. |
What about #2914 is very cool but will probably take a long time to implement |
Yes, I brought that up earlier (
I'd be concerned about adding a third help mode (two help modes can already be confusing). |
Oh well I guess we'll have to settle with current state until modular help rendering is implemented. I saw an issue to make aliases grey in colored output, that would also help with readability if it's possible to implement it earlier than modular rendering. |
It is. I was going to turn my attention to how we deal with colors in clap 4.1 (currently focused on 4.0). If someone wants to take a crack at that subset of it earlier, they are welcome to it. |
Please complete the following tasks
Clap Version
3.0.10
Describe your use case
Currently the developer either specifies
alias
orvisible_alias
so that aliases for commands are either always shown or always hidden in the help. On one hand, the developers want users to be able to discover shortcuts for the commands from help message, but on the other hand having aliases for each command clutters the screen and makes it less readable.Example with aliases:
Without:
Describe the solution you'd like
Add an additional argument to
--help
that prints help as if allalias
items werevisible_alias
ones. This way aliases would stay hidden by default to avoid screen clutter, but there would still be a way to discover them.Not sure how to better implement it
Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: