[feature request] Optional `help` commands
Author: maratoriCreated Jun 26, 2026Updated Jun 26, 2026
It's very handy when a CLI prints help not only with --help flag, but also with help command. Let's add an option WithHelpCommands() which makes the following runs behaving the same:
my-bin foo bar --help
my-bin foo bar -h
my-bin foo bar help
my-bin --help foo bar
my-bin -h foo bar
my-bin help foo barNow, users have to manipulate args to achieve the desired:
for i, arg := range os.Args[1:] {
if arg == "help" {
os.Args[1+i] = "--help"
}
}Source: alecthomas/kong