Skip to content

feat: add shell completion for bash and zsh#924

Open
mifisignal wants to merge 1 commit intovercel-labs:mainfrom
LeaperGroup:completion
Open

feat: add shell completion for bash and zsh#924
mifisignal wants to merge 1 commit intovercel-labs:mainfrom
LeaperGroup:completion

Conversation

@mifisignal
Copy link

Add agent-browser completion <shell> command that prints a shell completion script for bash or zsh. Introduce named module-level constants for every subcommand list (replacing local const blocks) so the new completion test suite can assert that each script covers all top-level commands, subcommands, and global flags.

@vercel
Copy link
Contributor

vercel bot commented Mar 19, 2026

@mfischer-zd is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@mifisignal mifisignal force-pushed the completion branch 2 times, most recently from 85ea07c to fe8c421 Compare March 19, 2026 02:19
Copy link
Collaborator

@ctate ctate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work — the completion scripts are thorough and the test macro that cross-checks against Rust source is a smart way to prevent drift. Three things needed before merging:

  1. Run cargo fmt — several long const arrays in commands.rs exceed the line width limit, so CI will fail without this.
  2. Add docs to skills/agent-browser/SKILL.md and docs/src/app/ per project convention (AGENTS.md requires all 4 doc locations updated for new user-facing commands; output.rs and README.md are already done).
  3. Typocompletion.rs:117: "autoompletion" → "autocompletion".

Add `agent-browser completion <shell>` command that prints a shell
completion script for bash or zsh. Introduce named module-level
constants for every subcommand list (replacing local const blocks) so
the new completion test suite can assert that each script covers all
top-level commands, subcommands, and global flags.
@mifisignal
Copy link
Author

Great work — the completion scripts are thorough and the test macro that cross-checks against Rust source is a smart way to prevent drift. Three things needed before merging:

  1. Run cargo fmt — several long const arrays in commands.rs exceed the line width limit, so CI will fail without this.

✅ done

  1. Add docs to skills/agent-browser/SKILL.md and docs/src/app/ per project convention (AGENTS.md requires all 4 doc locations updated for new user-facing commands; output.rs and README.md are already done).

✅ done, with one exception: The autocomplete functionality is to assist users who are using the tool interactively in a shell, so I can't imagine a situation in which a coding agent would bother with it. In light of that, do you agree that we can skip updating the Skill?

  1. Typocompletion.rs:117: "autoompletion" → "autocompletion".

✏️ fixed

Let me know if there's anything else @ctate !

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.

2 participants