Repository navigation
CommandNotFound: #2522
Answered
by
g4lb
stevewi-niteflyte
asked this question in
Q&A
CommandNotFound:
#2522
|
I found this snippet in So, I decided to implement it in my own command: I can't get the $ a2m foo I expected to see the No such command foo message but I got nada. What am I doing wrong? Follow-on question...a few of my commands have subcommands. How do I implement the same for a series of subcommands? Thanks in advance... |
Answered by
g4lb
Nov 2, 2026
Replies: 1 comment 1 reply
|
Your root command likely has an
For subcommands, set |
1 reply
Answer selected by
stevewi-niteflyte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your root command likely has an
Action. Thenfoogoes to it as an argument, soCommandNotFoundnever runs. My tests (v3.14.0):Action,a2m foo- Action gets[foo]Action,a2m foo- "No such command foo"For subcommands, set
CommandNotFoundon each parent. It does not inherit.