Skip to content

feat(cli): add shell completion (bash/zsh/fish) via @bomb.sh/tab #233 - #462

Merged
Hydralerne merged 2 commits into
oblien:mainfrom
MoMoUsama:feat/cli-autocomplete
Aug 5, 2026
Merged

feat(cli): add shell completion (bash/zsh/fish) via @bomb.sh/tab #233#462
Hydralerne merged 2 commits into
oblien:mainfrom
MoMoUsama:feat/cli-autocomplete

Conversation

@MoMoUsama

Copy link
Copy Markdown
Contributor

Closes #233

Summary

Adds shell auto-completion support to the Openship CLI using @bomb.sh/tab.

This introduces a new completion command that generates completion scripts for Bash, Zsh, and Fish from the live Commander command tree, ensuring commands, subcommands, and flags stay in sync automatically as the CLI evolves.

Scope

This PR implements static shell completion (commands, subcommands, and flags) only.

Dynamic value completion (e.g. project IDs, service names), as suggested in the issue, is intentionally left for a follow-up PR to keep this change focused and reviewable.

Changes

  • Added openship completion <bash|zsh|fish>.
  • Integrated @bomb.sh/tab with the CLI.
  • Added end-to-end tests
  • Documented shell completion setup in the README, including:
    • static completion scripts (recommended);
    • live-sourced completion.

Usage

openship completion bash
openship completion zsh
openship completion fish

Validation

  • Completion scripts are generated successfully for Bash, Zsh, and Fish.
  • Commands, subcommands, and flags complete as expected.
  • Internal completion commands are not suggested.
  • Existing CLI behavior remains unchanged.

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.

Feature request: add shell completion for the OpenShip CLI

2 participants