Skip to content

fix(nix): use current completion CLI flags - #50622

Closed
LeoParkerOu wants to merge 1 commit into
anomalyco:devfrom
LeoParkerOu:codex/fix-50408-nix-completions
Closed

LeoParkerOu wants to merge 1 commit into
anomalyco:devfrom
LeoParkerOu:codex/fix-50408-nix-completions

Conversation

@LeoParkerOu

Copy link
Copy Markdown

Issue for this PR

Closes #50408

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The Nix package still invoked opencode completion, but the current CLI generates shell completions through opencode --completions <shell>. This caused the Nix post-install completion step to fail.

This updates the bash and zsh completion commands to use the current CLI interface while preserving the existing installation behavior.

How did you verify your code works?

  • Checked the Nix expression with git diff --check.
  • Confirmed both bash and zsh commands use --completions.
  • Confirmed the obsolete opencode completion invocation is removed.
  • A full Nix build was not run locally because Nix is not installed.

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate found:

PR #50409: fix(nix): use Effect CLI completion flags
#50409

Why they're related: Both PRs address the same issue (#50408) - updating Nix completion commands to use the current CLI interface. PR #50409 appears to be a prior attempt at the same fix. You should verify which one is the active/correct approach or if they should be consolidated.

@attilaolah

Copy link
Copy Markdown

Let's add Fish too, pretty please? 🥺 OpenCode itself supports it (as well as vanilla sh).

attilaolah added a commit to attilaolah/dotfiles that referenced this pull request Sep 25, 2026
To be removed once anomalyco/opencode#50622 is
merged and released.
attilaolah added a commit to attilaolah/dotfiles that referenced this pull request Sep 25, 2026
* Update dependency anomalyco/opencode to v2.0.16

* chore(opencode): update flake lock

* chore(opencode): update expected source hashes

* chore(opencode): update hash overrides for darwin

* chore(opencode): update hash overrides for linux

* fix(opencode): cli completions

To be removed once anomalyco/opencode#50622 is
merged and released.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Attila Oláh <[email protected]>
@gigamonster256

Copy link
Copy Markdown
Contributor

my comment about tricking yargs should also be removed

@LeoParkerOu

Copy link
Copy Markdown
Author

Let's add Fish too, pretty please? 🥺 OpenCode itself supports it (as well as vanilla sh).

Thanks for adding the downstream workaround and linking it to #50622. I understand it is a temporary fix in attilaolah/os while waiting for the upstream change to merge and be released.

Before I update #50622, should this PR be retargeted to v2, or would you prefer the change to be consolidated with #50409? I also have a local patch adding Fish completions for both opencode and opencode2, but I have not pushed it yet.

@attilaolah

Copy link
Copy Markdown

Looking at #50409, it seems like that would be the better approach here. Since I have a workaround in place anyway, this is not urgent now, I'd rather see #50409 merged and extended to cover Fish.

As for v2, yes at this point I only really care about v2, although my assumption was that v2 would keep pulling in the v1 changes until the two branches are consolidated eventually? In any case, as long as the change somehow makes it to a v2 release, it should be fine.

Thanks!

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix: build fails after CLI completion command change

4 participants