-
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 support for custom help templates. #586
Conversation
Hi @harshavardhana! I really like this addition, but would you mind adding a test or two for it? |
Sure i can do that @jszwedko |
bf72f02
to
8e46386
Compare
Added tests as requested. @jszwedko |
8e46386
to
cea7bbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good @harshavardhana ; apologies for the delay! Just left one comment about changes that appear to be unrelated to the rest of this PR.
8ec026d
to
2d7ff34
Compare
Thanks for the review.. @jszwedko updated. Removed the change. |
help.go
Outdated
@@ -148,7 +179,11 @@ func ShowCommandHelp(ctx *Context, command string) error { | |||
|
|||
for _, c := range ctx.App.Commands { | |||
if c.HasName(command) { | |||
HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c) | |||
if c.CustomHelpTemplate != "" { | |||
HelpPrinter(ctx.App.Writer, c.CustomHelpTemplate, c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be calling HelpPrinterCustom
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.. doesn't matter really.
2d7ff34
to
2e58223
Compare
Updated @jszwedko |
@jszwedko anything pending here? |
@jszwedko anything else is needed ? |
@jszwedko can you tell me what is else needed to get this merged? |
👍 this looks good. Apologies for the severe delay in review; was on vacation for the past month and didn't keep up with my email as much as I thought I might. |
No problem @jszwedko |
No description provided.