Skip to content

feat: add shell completions for bash, zsh and fish - #10

Merged
1 commit merged into
Thakay:mainfrom
Ashutosh-Panda2004:feat/3-shell-completions
Oct 4, 2026
Merged

1 commit merged into
Thakay:mainfrom
Ashutosh-Panda2004:feat/3-shell-completions

Conversation

@Ashutosh-Panda2004

Copy link
Copy Markdown
Contributor

Closes #3

Static completion scripts for the three shells in completions/. They complete the flag names (-key, -url, -model, -timeout, -version, -h); -timeout also suggests 30s, 2m and 5m. Everything after the flags is the request, so no argument completion is offered there.

The scripts are wired into archives.files in .goreleaser.yaml and land in a completions/ directory inside the tarball — verified with make snapshot, which shows all three alongside the binary. The README gains a Shell completions section with install steps per shell, and the CHANGELOG has an entry under Unreleased.

Each script was exercised in its shell: bash completes -t to -timeout and the durations after -timeout; zsh registers _aiterm and parses; fish completes the flags and durations. make test and make lint pass, and go mod tidy leaves go.mod/go.sum unchanged.

Static completion scripts under completions/ complete the flag
names; -timeout also suggests 30s, 2m and 5m. Everything after the
flags is the request, so no argument completion is offered there.

The scripts are wired into the release archives (they land in
completions/ inside the tarball; verified with make snapshot), the
README gains a Shell completions section with per-shell install
steps, and the CHANGELOG records the addition under Unreleased.
@Thakay Thakay closed this pull request by merging all changes into Thakay:main in e459874 Oct 4, 2026
@Thakay

Thakay commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Thanks @Ashutosh-Panda2004, this is in! It landed through #13, which merges your commit unchanged and resolves the conflict with the man page from #11. One small fix went on top: bash and zsh no longer offer flags once the request has started, since aiterm rejects flags typed after the request.

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.

Add shell completions for bash, zsh and fish

2 participants