Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
This describes the v1 CLI (the 1.19.3 binary the author ran), not v2, which is what dev and this docs page cover. I ran the v2 CLI from source at the PR's head commit to check.
opencode completionis not a v2 command. It fails withENOENT: chdir ... -> 'completion'because v2 reads the word as a directory argument. Completions come from the global flag--completions <bash|zsh|fish|sh>. The script printed byopencode --completions bashsays to install it withopencode --completions bash >> ~/.bashrc. zsh, fish and sh are supported too, not only bash.opencode providersdoes not exist in v2.authhas no aliases inpackages/cli/src/commands/commands.ts, andopencode providersfails the same way. Please drop that sentence.
The public API is unchanged (docs only). If you rework the section around --completions, it may fit better under Global Flags than as a command.
Related: #56019
| ### auth | ||
|
|
||
| Command to manage credentials and login for providers. | ||
| Command to manage credentials and login for providers. Also available as `opencode providers`. |
There was a problem hiding this comment.
This doesn't hold for v2: auth has no aliases in packages/cli/src/commands/commands.ts, and opencode providers runs as opencode <directory> (it fails with ENOENT: chdir ... -> 'providers'). The alias is from v1 (1.19.3). Please remove this sentence.
|
|
||
| --- | ||
|
|
||
| ### completion |
There was a problem hiding this comment.
v2 has no completion subcommand: opencode completion is taken as a directory and fails. Completions come from the global flag --completions <bash|zsh|fish|sh>, e.g. opencode --completions bash >> ~/.bashrc, which is also the install line printed in the script's header. Please document the flag (with the zsh/fish/sh options) instead, perhaps under Global Flags.
The v2 CLI prints a shell completion script with the --completions global flag (bash, zsh, fish, sh) and the CLI reference did not mention it. The install line for each shell is taken from the script the binary prints.
|
The page I originally edited is the v1 reference, not v2 — that is worth separating, because the two doc trees ship from the same repo:
So
If the v1 page should also carry a |
6177ff7 to
b684549
Compare
Issue for this PR
No issue.
Type of change
What does this PR do?
Documents the
--completionsglobal flag, which the CLI reference did not mention. It prints a completion script forbash,zsh,fishorsh, and the install line for each shell is taken from the script the binary prints.How did you verify your code works?
Ran the 2.1.1 binary for each shell and built the docs site.
Screenshots / recordings
Not a UI change.
Checklist