Default cli.App.Usage
behaviour is very hard to override and leads to ugly help
#1924
Open
3 tasks done
Labels
area/v2
relates to / is being considered for v2
kind/bug
describes or fixes a bug
status/triage
maintainers still need to look into this
My urfave/cli version is
v2.27.2
Checklist
Dependency Management
Describe the bug
This line of the code doesn't allow to set an empty
cli.App.Usage
value, which together with the fact thathelpNameTemplate
is not configurable makes it hard to have a cleanHELP:
section in the CLI docs.cli/command.go
Line 203 in 1210bdf
To reproduce
Create a
cli.App{Usage: ""}
orcli.App{}
struct and launch it with--help
.Observed behavior
It's not possible to remove the
"A new cli application"
string from the help.Setting
Usage
to" "
also leaves the-
.The only way I've found is to entirely override
cli.AppHelpTemplate
or setUsage: "\b\b "
.Expected behavior
I would like to be able to set
Usage
to""
without it being overridden, or at least be able to customizehelpNameTemplate
to be able to remove the part that usesUsage
.Want to fix this yourself?
We'd love to have more contributors on this project! If the fix for
this bug is easily explained and very small, feel free to create a
pull request for it.
Run
go version
and paste its output hereRun
go env
and paste its output hereThe text was updated successfully, but these errors were encountered: