-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Context
Part of the 🛠 Developer experience EPIC #77, targeting v1.7.0.
Goal
Add a completions subcommand that outputs a shell completion script for bash, zsh or fish.
Users install once:
# bash (~/.bashrc)
eval "$(github-code-search completions --shell bash)"
# zsh (~/.zshrc)
eval "$(github-code-search completions --shell zsh)"
# fish (~/.config/fish/config.fish)
github-code-search completions --shell fish | sourceWhen --shell is omitted, the shell is auto-detected from $SHELL.
Scope
- New
completionssubcommand ingithub-code-search.ts - Completion scripts as inline templates (no new runtime dependency)
- Covers subcommands:
query,upgrade,completions - Covers common options:
--org,--format,--output-type,--exclude-repositories,--exclude-extracts,--group-by-team-prefix,--no-interactive,--include-archived,--no-cache - TDD: unit tests that verify the output is a non-empty string containing the tool name for each shell
Acceptance criteria
-
github-code-search completions --shell bash→ valid bash script -
github-code-search completions --shell zsh→ valid zsh script -
github-code-search completions --shell fish→ valid fish script - Auto-detection from
$SHELL(fish/zsh/bash) - Unknown shell → friendly error message + exit 1
- Unit tests pass
Reactions are currently unavailable