Summary
Top-level (root) flags of the opencode command are never suggested by shell tab completion. Completing opencode <TAB> lists subcommands but no --option flags.
Expected behavior
Typing opencode --<TAB> (or opencode <TAB> showing both commands and flags) should suggest all valid top-level flags, including --continue, --session, and --fork.
Actual behavior
opencode --get-yargs-completions opencode --co (and --cont) returns only:
--help
--version
--print-logs
--log-level
--pure
Flags like --continue, --session, and --fork are valid (confirmed via opencode --help: -c, --continue, -s, --session, --fork), but are never surfaced by the completion script.
Reproduction
# Install completion
opencode completion > /usr/share/zsh/site-functions/_opencode
# In zsh:
opencode --co<TAB> # suggests --help, --version, --print-logs, --log-level, --pure
opencode <TAB> # lists subcommands only, no flags
The completion script is a thin wrapper that calls opencode --get-yargs-completions at runtime, so this is a bug in the yargs completion generation (--get-yargs-completions), not in the installed completion file. The installed file is byte-identical to the current opencode completion output.
Environment
- opencode binary:
/usr/bin/opencode
- shell: zsh
- completion installed via
opencode completion to /usr/share/zsh/site-functions/_opencode
Summary
Top-level (root) flags of the
opencodecommand are never suggested by shell tab completion. Completingopencode <TAB>lists subcommands but no--optionflags.Expected behavior
Typing
opencode --<TAB>(oropencode <TAB>showing both commands and flags) should suggest all valid top-level flags, including--continue,--session, and--fork.Actual behavior
opencode --get-yargs-completions opencode --co(and--cont) returns only:Flags like
--continue,--session, and--forkare valid (confirmed viaopencode --help:-c, --continue,-s, --session,--fork), but are never surfaced by the completion script.Reproduction
The completion script is a thin wrapper that calls
opencode --get-yargs-completionsat runtime, so this is a bug in the yargs completion generation (--get-yargs-completions), not in the installed completion file. The installed file is byte-identical to the currentopencode completionoutput.Environment
/usr/bin/opencodeopencode completionto/usr/share/zsh/site-functions/_opencode