Document CLI shell completion (viam completion)#5005
Open
shannonbradshaw wants to merge 2 commits intomainfrom
Open
Document CLI shell completion (viam completion)#5005shannonbradshaw wants to merge 2 commits intomainfrom
shannonbradshaw wants to merge 2 commits intomainfrom
Conversation
rdk#5947 enabled urfave/cli v3 shell completion, adding a hidden `viam completion` subcommand that outputs completion scripts for bash, zsh, fish, and PowerShell. Add setup instructions to the CLI overview and a reference entry for the completion command. https://claude.ai/code/session_01EFZQ9UyvXPCRPfr1XcAXC7
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds documentation for the newly introduced viam completion subcommand so users can enable interactive shell tab-completion across supported shells.
Changes:
- Documented the
viam completioncommand and its supported shell arguments in the CLI reference. - Added an “Enable shell completion” section to the CLI overview with per-shell setup instructions and tab-completion examples.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/cli/reference.md | Adds a new completion command entry and links back to setup instructions. |
| docs/cli/overview.md | Adds shell-specific setup steps (bash/zsh/fish/PowerShell) and example usage for tab completion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {{% /tab %}} | ||
| {{% tab name="fish" %}} | ||
|
|
||
| ```sh {class="command-line" data-prompt="$"} |
Collaborator
Author
There was a problem hiding this comment.
Fixed in 15b6345. Added mkdir -p ~/.config/fish/completions before the redirect.
Generated by Claude Code
Comment on lines
+208
to
+210
| The CLI supports tab completion for commands, subcommands, and flag names. | ||
| To enable it, source the completion script for your shell. | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
| ### `completion` | ||
|
|
||
| The `completion` command outputs a shell completion script. | ||
| Source the output in your shell to enable tab completion for commands, subcommands, and flag names. |
Collaborator
Author
There was a problem hiding this comment.
- Replace "source" with "load" in both overview and reference since fish and PowerShell do not use source - Add mkdir -p for the fish completions directory https://claude.ai/code/session_01EFZQ9UyvXPCRPfr1XcAXC7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Source changes
viamcommand. Adds a hiddenviam completionsubcommand that emits completion scripts for bash, zsh, fish, and PowerShell. Every command now responds to--generate-shell-completionso the scripts can query live completions for subcommand names and flag names.Docs changes
docs/cli/overview.md: Added "Enable shell completion" section with setup instructions for bash, zsh, fish, and PowerShell, using tabbed code blocks. Includes usage examples showing tab completion for commands and flags.docs/cli/reference.md: Addedcompletioncommand entry documenting the four supported shell arguments (bash, zsh, fish, pwsh) with a link back to the overview setup instructions.How I found these
EnableShellCompletion: trueadded tocli/app.goroot commandviam completion bash|zsh|fish|pwshGenerated by daily docs change agent