-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 option to avoid that '[arguments...]' been printed #1069
Comments
This makes sense to me @tredoe! Although I want to check to see if anyone else in @urfave/cli also thinks this is a good idea? Since I know we've had some concerns about there being too many options. |
I think we should just not print that if the app does not support arguments, makes no sense to hide it behind a flag. |
is there a way to indicate that an app does not support arguments? |
Looks like there isn't—we expose the args as a string slice directly off of the flag set. We don't have a way to tell if a user application happens to call that function or not.
I do see this as a common use case, but if we added a configurable field for every common use case, we'd end up with a pretty big list of fields. It's trivial to pass a custom help template in for an app.CustomAppHelpTemplate = myCustomTemplate Where |
I don't see a problem by having a great list of fields; the standard library has several types with a pretty big list of fields i.e. at the package http. |
HTTP solves a complex problem, as does a CLI library, so the number of knobs we end up with is definitely a product of that complexity. But part of managing software is trying to reduce the amount of complexity we have to deal with. For the A few of the problems with having too many fields:
|
The type Request from package HTTP was only an example; I have read the standard library so I know that it has many types with a big list of fields; more examples: type header at tar, or type FileHeader at zip. |
Your points are valid for whatever code that been added; I mean that it is not exclusive to have "many fields" into a structure.
It is solved with the documentation.
This was solved a long time ago with versioning software. |
See also => #1074 |
I'm making this as |
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
Closing this as it has become stale. |
Checklist
What problem does this solve?
USAGE
with a text like:cmd_name
[global options] command [command options] [arguments...]
showing
[arguments...]
even when your command is not going to use any argument.Solution description
Add a boolean to indicate that
[arguments...]
does not been printed.The text was updated successfully, but these errors were encountered: