Open tiennou opened 7 years ago
@tiennou I agree that the behavior is not intiutive, however it is documented in the Wiki with some examples: https://github.com/ManageIQ/trollop/wiki/Banner%2C-Synopsis-and-Version
The warnings should be fixed in PR #80
Is there a suggestion on how it should behave?
I suggest that banner
, being an alias of text
, shouldn't prevent usage
& synopsis
from working, so we get to have both nice, automated synopsises as well as free-form text. Would that be acceptable ?
From a backward-compatibility POV, I don't think it would have a big impact, seeing as it's either banner
/text
OR usage
/synopsis
, you would have skimmed over the former as soon as you were to use the latter.
I'm mixed on this one.
I had thought that banner
is used to define your own header.
If you didn't provide it, the system would create one using version
, usage
and synopsis
@Fryguy you see any downside to always producing header information even when banner
is added.
Example option block :
Output when passed
--help
is :If I comment just the banner line, I get this :
Additionally, I get warnings (the shebang line is
#!/usr/bin/env ruby -W
) depending on whether theusage
orsynopsis
lines are comment out :