Repository navigation
feat: add shell completions for bash, zsh and fish - #13
Merged
Merged
Conversation
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.
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>
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
-flag=valueform) 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-helplike the other shells..goreleaser.yamlandCHANGELOG.mdare resolved by keeping both entries.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 -Aform documented in zshcompsys; zsh and fish were not run locally. The fish script is unchanged.Related issue
Closes #3
Type of change
Checklist
make testandmake lintpass locally. (No Go code changed; CI runs both.)## [Unreleased]inCHANGELOG.mdfor user facing changes.README.md,aiterm -hhelp text) where needed.🤖 Generated with Claude Code