Skip to content

feat: Release completions as a tarball and validate loaded scripts - #597

Merged
razor-x merged 1 commit into
mainfrom
claude/completions-tarball-ka6fba
Aug 4, 2026
Merged

feat: Release completions as a tarball and validate loaded scripts#597
razor-x merged 1 commit into
mainfrom
claude/completions-tarball-ka6fba

Conversation

@razor-x

@razor-x razor-x commented Aug 4, 2026

Copy link
Copy Markdown
Member

Follow-up to #594.

Summary

  • Release the shell completion loaders as a single seam-completions-v<version>.tar.gz asset instead of three bare files, and source the seam-bin AUR package from that tarball. The versioned filename also removes the need to rename the sources in the PKGBUILD.
  • Harden the loaders: the output of seam completion <shell> is evaluated only when it starts with the exact first line the script generator produces. This fixes the reported fish failure, where a seam without the completion command printed Not logged in. Please run "seam login" to stdout and the loader piped it into source (fish: Unknown command: Not). Nothing the CLI prints other than a completion script is ever evaluated now.
  • A test pins the sentinel first lines to the generator output so the loaders and the scripts cannot drift apart.
  • Document what each shell needs before installed completions appear: bash reads them via the bash-completion package, and zsh caches its completion functions in ~/.zcompdump, which frameworks calling compinit -C never rebuild on their own. Fish needs nothing extra.

Verification

  • All three hardened loaders verified in real shells against the current CLI: bash registers and completes, zsh renders the menu on the first TAB through fpath autoload in a pty, fish completes commands and enum values.
  • All three verified against a fake old seam that prints Not logged in and exits 0: no errors, nothing evaluated, shells degrade to their default completion.
  • Tarball creation, checksums, and extraction simulated exactly as _build.yml and makepkg run them.
  • 103 tests, lint, and typecheck pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_016eYkGybhEJJE3FkaqXdwLv


Generated by Claude Code

Release the shell completion loaders as one
seam-completions-v<version>.tar.gz asset instead of three bare files,
and source the seam-bin AUR package from the tarball. The versioned
name also removes the need to rename the sources in the PKGBUILD.

Harden the loaders: evaluate the output of 'seam completion' only when
it starts with the exact first line the script generator produces.
A seam without the completion command prints other things, e.g.,
'Not logged in. Please run "seam login"', which the fish loader piped
into source and fish reported as 'Unknown command: Not'. Nothing the
CLI prints other than a completion script is ever evaluated now, and
a test pins the sentinel lines to the generator output so they cannot
drift apart.

Document what each shell needs before installed completions appear:
bash reads them via the bash-completion package, and zsh caches its
completion functions in ~/.zcompdump, which frameworks calling
compinit -C never rebuild on their own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016eYkGybhEJJE3FkaqXdwLv
@razor-x
razor-x merged commit 9db1fde into main Aug 4, 2026
12 checks passed
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.

2 participants