Cli: Show help for command

Created on 9 Jul 2016  路  7Comments  路  Source: urfave/cli

I have been trying to figure out how to show the help for a command.
I have tried both app -h and app cmd -h without success.

app cmd subcmd -h works for subcomands, so I would assume app cmd -h would work?

kinbug

All 7 comments

@fgblomqvist What branch/release are you using? 馃樃

I'm on the latest release on the v1 branch (v1.18).

@fgblomqvist So far I'm unable to reproduce the problem you're describing, which means I must not understand 馃樅鉂わ笍 https://gist.github.com/meatballhat/5ad61bdb9b72e8729dd6c88dd3a1d278

I _do_ see some inconsistencies in there that bother me, but that's another issue ...

@meatballhat Hmm interesting. Clearly it's working in your example.
I ran some more tests and concluded the following:
app cmd help works
app help cmd works
app cmd -h doesn't work (it runs the Action function)
app cmd --help doesn't work (it runs the Action function)
I will try to replicate this with an example program...

Thanks for the report @fgblomqvist ! Oddly enough, I tried to do a git bisect and couldn't find a working version with your test code so it is possible that this never worked. Either way, #481 should address it -- let me know what you think

No problem, happy to help! The changes look good to me. Will go get it as soon as the PR has been merged. Thanks for fixing it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

efairon picture efairon  路  5Comments

lynncyrin picture lynncyrin  路  5Comments

lynncyrin picture lynncyrin  路  3Comments

krostar picture krostar  路  5Comments

LeonB picture LeonB  路  5Comments