Skip to content

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

Merged
Thakay merged 4 commits into
mainfrom
land-pr-10-completions
Oct 4, 2026
Merged

Thakay merged 4 commits into
mainfrom
land-pr-10-completions

Conversation

@Thakay

@Thakay Thakay commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

Lands #10 by @Ashutosh-Panda2004: static completion scripts for bash, zsh and fish in completions/, shipped in the release archives, with README install steps.

Their commit is merged unchanged, so authorship is kept. On top of it:

  • Fix: aiterm rejects a flag typed after the request, but bash and zsh still offered the flags there. bash now skips flag values (including the -flag=value form) and stops at the first request word or --. zsh uses _arguments -A '-*' for the same effect, drops -s (Go flags do not stack) and completes -help like the other shells.
  • Merge: conflicts with the man page from docs: add aiterm man page #11 in .goreleaser.yaml and CHANGELOG.md are resolved by keeping both entries.
  • Docs: the README usage section links the man page (suggested in docs: add aiterm man page #12), and the finished completions item leaves the roadmap.

Tested: the bash script was exercised with simulated completion words, covering flags, flag values, -flag=value, the request, and --. The zsh change follows the _arguments -A form documented in zshcompsys; zsh and fish were not run locally. The fish script is unchanged.

Related issue

Closes #3

Type of change

  • Bug fix (fixes a problem without changing intended behavior)
  • New feature (adds functionality without breaking existing usage)
  • Breaking change (changes existing flags, environment variables, output or exit codes)
  • Documentation only
  • Tests, CI, build or refactoring (no user facing change)

Checklist

  • I added or updated tests for this change. (Shell scripts only; no Go code changed.)
  • make test and make lint pass locally. (No Go code changed; CI runs both.)
  • I added an entry under ## [Unreleased] in CHANGELOG.md for user facing changes.
  • I updated the docs (README.md, aiterm -h help text) where needed.
  • My commits and the pull request title follow Conventional Commits.

🤖 Generated with Claude Code

Ashutosh-Panda2004 and others added 4 commits October 4, 2026 12:11
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.
Brings in Ashutosh-Panda2004's commit from #10 unchanged. The conflicts
with the man page from #11 in .goreleaser.yaml and CHANGELOG.md are
resolved by keeping both entries.

Co-authored-by: Claude <noreply@anthropic.com>
aiterm rejects a flag typed after the request, but bash and zsh still
offered the flags there. bash now skips flag values (including the
"-flag=value" form) and stops at the first request word or "--". zsh
uses _arguments -A for the same effect, drops -s (Go flags do not stack)
and completes -help like the other shells.

Co-authored-by: Claude <noreply@anthropic.com>
The usage link to the man page was suggested in #12.

Co-authored-by: Claude <noreply@anthropic.com>
@Thakay
Thakay merged commit e459874 into main Oct 4, 2026
10 checks passed
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