-
Notifications
You must be signed in to change notification settings - Fork 60
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
ffcli: use ShortHelp field as tagline #87
Comments
Is a "tagline" a well-defined concept? Can you point me to any prior art you might be aware of? It's true that the ShortHelp of a Command is only consumed and displayed by its parent Command(s), but that's by design: the assumption is that when you know to type a given [sub]command, you are already aware of what it itself should be doing. Maybe this assumption is worth revisiting — I could be convinced that a nonzero ShortHelp should act as a prefix to any help output. Would you advocate for that? For the record, we're discussing the behavior of the DefaultUsageFunc provided by the package, which you're under no obligation to use! You can easily write your own UsageFunc with the behavior you're after. |
The
above, the tagline for the root is line 4.
here we see line 4, the tagline, is the same as ShortHelp at line 41 in the previous output. Another example is
and
the tagline is line 4, which comes from the
I do agree that probably the majority of the utilities out there follow this assumption.
This is what I was proposing, yes. At the end, I don't think that in this case there is a "right" and "wrong". It is a question of taste and ffcli is yours :-)
Agreed. On the other hand, as a user feedback, using ffcli in the style of objectctl (with separate packages for commands, and also for the root command) is already verbose, although I understand the reason, so if one could avoid providing also a UsageFunc, it would be, in my opinion, better :-) |
Just parenthetically: if you find this to be true, then don't use it that way! :) The examples are meant to be showcases, not necessarily templates to follow. I agree that package-per-command doesn't make sense at all unless your commands each encapsulate a lot of logic. |
Hello @peterbourgon,
Consider the help output of a program with subcommands:
if then we ask the help for a subcommand we "loose" the ShortHelp:
This proposal is to use the
Name
andShortHelp
field of the subcommand as a "tagline":Actually this could be used also for the tagline of the root command itself:
What do you think?
The text was updated successfully, but these errors were encountered: