-
const cliffy = await new Command()
.name("chef")
.command("run", "run a binary")
.action()
.parse(Deno.args); I want to show the default help menu, if the binary is run with no sub-commands so far I only found this hack if (cliffy.cmd._name === "chef") cliffy.cmd.showHelp() |
Beta Was this translation helpful? Give feedback.
Answered by
c4spar
Jan 29, 2023
Replies: 1 comment 4 replies
-
You can use the .action(function () {
this.showHelp();
}); |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
sigmaSd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the
.showHelp()
or.getHelp()
method inside the action handler. Create a reference of your command or usethis
to get the current command instance.