anomalyco / anomalyco/opencode
[Bug] TAB completion for TUI options doesn't work
Open
@simonklee is already working on this.
Since Aug 5, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The tab completions (powered by opencode --get-yargs-completions) doesn't recognize the "top-level" options intended for the TUI.
Additionally it shows a $0 as an option.
I.e. those here: https://github.com/anomalyco/opencode/blob/4a57013cf8cb163f58638273fd9da8538cd33cb7/packages/opencode/src/cli/cmd/tui.ts#L72-L143
That is an issue for something as common as opencode --continue
OpenCode version
1.18.13
Steps to reproduce
- Setup bash completion:
opencode completion >> ~/.bashrc - type
opencode - Press TAB twice
$ opencode
$0 acp agent attach completion db debug export github import mcp models plugin pr providers run serve session stats uninstall upgrade web
Similar for options:
$ opencode --
--help --log-level --print-logs --pure --version
Operating System
Linux Mint 22.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.