Skip to content

fix(completion): audit FUNCTION markers and user-visible strings in _zinit - #845

Draft
HaleTom wants to merge 3 commits into
zdharma-continuum:mainfrom
HaleTom:fix-zinit-completion-audit
Draft

HaleTom wants to merge 3 commits into
zdharma-continuum:mainfrom
HaleTom:fix-zinit-completion-audit

Conversation

@HaleTom

@HaleTom HaleTom commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Type of change

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

What does this PR do?

Audits every # FUNCTION: marker and user-visible string in _zinit
(9 hunks, all in the one file):

  • Add missing # FUNCTION: _zinit_debug marker (_zinit_debug was the only
    block-style function without one; every command↔function mapping was
    validated — cdlist→_zinit_cdlist included).
  • Fix 3 copy-pasted _message strings that all wrongly read
    list the defined key bindings replay, using each command's own
    description: bindkeys, report (show plugins report), load
    (load a plugin).
  • Spelling/grammar: a plugins → a plugin, plugins source →
    plugin's source, apend → append, get list → get the list,
    trailing space trimmed on the recall entry.

Deliberately left out (needs maintainer wording, not guessed):
recall's truncated description (...and construct — what?),
srv's Control a service, command comma, the terse Stress message,
and a marker for the conditional one-liner _zinit_debug_cmds (a
[[[ fold marker would mis-fold there).

How did you verify your code works?

  • zsh -n _zinit — syntax OK (on the exact branch bytes).
  • Marker audit: every # FUNCTION: name [[[ in the file matched against
    the name(){ definition that follows it; every entry in
    __zinit_commands checked for a corresponding _zinit_<name> function
    and vice versa.
  • Full file diff of the branch against upstream main: exactly these hunks
    — nothing else changed, nothing deleted.

Checklist

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

Related work

Spun out of the nounset audit for #842 / #843
(the _zinit nounset guard itself lives in #843).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant