You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So ahoy deploy <TAB> executes ahoy deploy --generate-bash-completion. In v3 the flag pre-parser in flag.go stops at the command name, so the flag reaches deploy as a plain argument and deploy runs.
# sub.ymlahoyapi: v2commands:
baz:
cmd: echo RAN bazqux:
cmd: echo RAN qux
Command
v2.5.0
v3.0.1 / master
ahoy foo --generate-bash-completion
nothing
RAN foo
ahoy foo dis --generate-bash-completion
nothing
RAN foo dis
ahoy bar --generate-bash-completion
baz qux help
help for bar
ahoy bar ba --generate-bash-completion
baz qux help
help for bar
The existing bats test "Bash completion continues to work" only covers the flag ahead of the command, which still works.
Related
The root command's ValidArgsFunction returns every command name, including hidden ones such as __complete. Cobra already offers the visible names, so with ahoy completion bash every command is listed twice.
This issue was AI generated (Claude Code) and human tested and validated.
Activity