Skip to content

feat: add shell completion command#285

Open
mugiwaraluffy56 wants to merge 2 commits intomicrocks:masterfrom
mugiwaraluffy56:feat/shell-completion-command
Open

feat: add shell completion command#285
mugiwaraluffy56 wants to merge 2 commits intomicrocks:masterfrom
mugiwaraluffy56:feat/shell-completion-command

Conversation

@mugiwaraluffy56
Copy link
Copy Markdown
Contributor

@mugiwaraluffy56 mugiwaraluffy56 commented May 5, 2026

Adds a visible completion command for bash, zsh, fish, and PowerShell. The root command already hides Cobra default completion command, so users currently do not have a documented way to generate shell completion scripts from the CLI.

For example, zsh users can run microcks completion zsh > "${fpath[1]}/_microcks" and then reload their shell completions. Bash, fish, and PowerShell users can generate the same kind of script for their shell.

The command writes completion output to the configured command output, which keeps it usable for tests and shell redirection. I also added command coverage and documented the new command in the README and command docs.

Tested with go test ./... and make build-binaries.

example output for zsh completion:
image

Signed-off-by: puneeth_aditya_5656 <[email protected]>
Signed-off-by: puneeth_aditya_5656 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant