anomalyco / anomalyco/opencode

[Bug] TAB completion for TUI options doesn't work

Open
#40,660 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Setup bash completion: opencode completion >> ~/.bashrc
  2. type opencode
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.