Skip to content

fix: narrow init keywords to { "YedPool" } so both URL spellings load#13

Merged
YedPool merged 2 commits into
mainfrom
fix/init-keyword-mismatch
May 10, 2026
Merged

fix: narrow init keywords to { "YedPool" } so both URL spellings load#13
YedPool merged 2 commits into
mainfrom
fix/init-keyword-mismatch

Conversation

@YedPool
Copy link
Copy Markdown
Owner

@YedPool YedPool commented May 10, 2026

Summary

After the repo rename to Wezurrect, the encoded plugin path on disk no longer contains resurrect — but PR #12 kept "resurrect" in the keyword list. With it required and missing, dev.setup() returns nil, package.path is never updated, and require("resurrect.utils") fails on a fresh install:

module 'resurrect.utils' not found:
  no field package.preload['resurrect.utils']
  no file '...wezterm_modules/resurrect\utils.lua'
  ...

Why a single-keyword match ({ "YedPool" })

wezterm.plugin.require() caches the plugin under the URL the user supplied, not the redirect target. Two URL spellings reach this codebase:

URL the user passes Encoded path on disk Contains Wezurrect? Contains YedPool?
https://github.com/YedPool/Wezurrect …sZsYedPoolsZsWezurrect
https://github.com/YedPool/resurrect.wezterm (README's snippet) …sZsYedPoolsZsresurrectsDswezterm ❌ (lowercase wezterm, not Wezurrect)

dev.wezterm uses case-sensitive :find and requires every keyword to substring-match. The only substring common to both spellings is YedPool, which also correctly excludes the upstream MLFlexer fork.

Trade-off: keywords = { "YedPool" } would stop being unique if YedPool ever publishes another wezterm plugin. Acceptable today; revisit when that happens.

Change

-keywords = { "YedPool", "resurrect", "wezterm" },
+-- Substring(s) present in the encoded plugin path. wezterm caches by the
+-- URL the user supplied (NOT the redirect target), so paths can be
+-- "...sZsYedPoolsZsWezurrect" (canonical URL) OR
+-- "...sZsYedPoolsZsresurrectsDswezterm" (README's redirected URL).
+-- "YedPool" is the only substring common to both forms; it also
+-- correctly excludes the upstream MLFlexer fork.
+keywords = { "YedPool" },

Test plan

  • Fresh install via canonical URL https://github.com/YedPool/Wezurrect → plugin loads, Alt+S/R/W keybindings appear in wezterm show-keys output.
  • Fresh install via README URL https://github.com/YedPool/resurrect.wezterm → plugin loads (would have failed with the previous commit on this branch; needs verification before merge).
  • Confirmed wezterm.plugin.list() returns the expected encoded path; "YedPool" substring is present in both spellings.

Commits in this PR

  • 1937a32 first attempt ({ "YedPool", "Wezurrect" }) — superseded; would have broken README-following installs
  • 1d0ac46 narrowed to { "YedPool" } covering both URL spellings (current)

🤖 Generated with Claude Code

dev.wezterm matches plugins by case-sensitive substring search across
the encoded plugin path. After the repo rename to Wezurrect, the
encoded path is "...sZsYedPoolsZsWezurrect" — which contains "Wezurrect"
but NOT "resurrect" (the 's' in resurrect vs the 'z' in Wezurrect).

PR #12 added "YedPool" for disambiguation but kept the stale "resurrect"
keyword. With "resurrect" required AND missing from the path, dev.setup()
silently returns nil; the subsequent require("resurrect.utils") fails
with "module 'resurrect.utils' not found" because package.path was never
updated. The plugin appears to do nothing on first install.

Drop "resurrect" and "wezterm" — "YedPool" + "Wezurrect" together
uniquely identify this plugin.
The previous commit on this branch used keywords = { "YedPool", "Wezurrect" },
which works only for users who installed via the canonical URL
https://github.com/YedPool/Wezurrect. But the README's Quick Start (and
all 8 install snippets in README.md) tells users to require
https://github.com/YedPool/resurrect.wezterm. GitHub 301-redirects this
to /Wezurrect, but wezterm caches the plugin under the URL the user
supplied -- so README-following users have an encoded path of
"...sZsYedPoolsZsresurrectsDswezterm" which contains "YedPool" but NOT
"Wezurrect" (case-sensitive substring; lowercase "wezterm" doesn't
match capital "W").

Net effect of the previous commit: it would have moved the load failure
from "fresh installs via canonical URL" (small cohort) to "fresh installs
via README" (large cohort). Same bug, different cohort.

Drop to a single-keyword match: "YedPool". Properties:
- Matches both URL spellings (both encode "YedPool" verbatim).
- Excludes the upstream MLFlexer fork (different account name).
- Trade-off: stops being unique if YedPool publishes another wezterm
  plugin in future. Acceptable today; revisit if/when that happens.

Add an inline comment explaining the constraint so future maintainers
don't fall into the same trap.
@YedPool YedPool changed the title fix: match Wezurrect substring instead of stale "resurrect" keyword fix: narrow init keywords to { "YedPool" } so both URL spellings load May 10, 2026
@YedPool YedPool merged commit 5793def into main May 10, 2026
@YedPool YedPool deleted the fix/init-keyword-mismatch branch May 10, 2026 06:45
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.

1 participant