Skip to content

feat(completions): add --watch and --update-snapshots to bun test completions#27908

Open
ssing2 wants to merge 1 commit intooven-sh:mainfrom
ssing2:fix-2503-shell-completions
Open

feat(completions): add --watch and --update-snapshots to bun test completions#27908
ssing2 wants to merge 1 commit intooven-sh:mainfrom
ssing2:fix-2503-shell-completions

Conversation

@ssing2
Copy link
Contributor

@ssing2 ssing2 commented Mar 8, 2026

Fixes #2503

Adds bash completion support for test command options.

Changes

  • Added test case to bash completions
  • Supports --watch/-w, --update-snapshots/-u, --cwd, --config/-c, --help/-h, --version/-v
  • Matches existing zsh completion behavior

Before

bun test <tab>
# Shows only global options

After

bun test <tab>
# Shows --watch, --update-snapshots, and other test-specific options

Zsh completions already had these options. This brings bash completions to parity.

…pletions

Fixes oven-sh#2503

Adds bash completion support for test command options:
- --watch / -w
- --update-snapshots / -u
- --cwd
- --config / -c
- --help / -h
- --version / -v

Previously, test command only showed global options.
Now it shows test-specific options to match zsh completions.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6051e299-507b-4262-8f94-c0cc12afc9b1

📥 Commits

Reviewing files that changed from the base of the PR and between e2b0d24 and f9b80db.

📒 Files selected for processing (1)
  • completions/bun.bash

Walkthrough

Adds bash completion support for the bun test subcommand with options including --watch, --update-snapshots, and others, addressing missing recently added arguments in shell completions.

Changes

Cohort / File(s) Summary
Bash Test Completion
completions/bun.bash
Adds bash completion branch for bun test (alias t) subcommand with support for --help, -h, --watch, -w, --update-snapshots, -u, --cwd, --config, -c, --version, -v options.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses issue #2503 by adding bash completions for --watch and --update-snapshots to bun test, but does not implement completions for bun --watch or bun run --watch as also requested in the issue. Implement bash completions for bun --watch and bun run --watch to fully address all requirements in issue #2503.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately and specifically describes the main change: adding --watch and --update-snapshots options to bun test bash completions.
Description check ✅ Passed The PR description provides good context with 'What does this PR do?' and 'How did you verify?' sections implicitly covered, but does not follow the exact template format specified.
Out of Scope Changes check ✅ Passed All changes are scoped to adding bash completions for the bun test command, directly related to issue #2503 requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ssing2 added a commit to ssing2/bun that referenced this pull request Mar 9, 2026
Adds type definition for shell completion resolver functions.
Used by the shell completion system added in oven-sh#27908.
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.

Update shell completions

1 participant