refactor: check-completions belongs to zarg, not scripts/lib - #83
Merged
Conversation
It greps consumers for zarg_go and pipes zarg's emitted completions into the shells they target — that's zarg's integration test, and it sat in the scripts' helper directory only because that's where it was written. Moved to zsh-plugins/zarg/check-completions.zsh, next to the unit suite it complements. The .zsh suffix keeps it inside CI's existing zsh-plugins/*/*.zsh syntax glob; path depth is unchanged, so its root resolution still holds. scripts/lib/ is now just common.zsh, which is what it claimed to be: output helpers, nothing to do with parsing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014CzNvwMVqrpyy2N1vhHQui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/lib/check-completions→zsh-plugins/zarg/check-completions.zsh.It greps consumers for
zarg_goand pipes zarg's emitted completions into the shells they target. That's zarg's integration test — it sat in the scripts' helper directory only because that's where I happened to write it.Now it lives next to the unit suite it complements:
scripts/lib/is left holding justcommon.zsh, which is what it claimed to be —_dt_*output helpers, nothing to do with parsing.Details worth checking
.zshsuffix is load-bearing. CI's syntax step globszsh-plugins/*/*.zsh; without the suffix the file would have silently dropped out of that check.scripts/lib/xandzsh-plugins/zarg/xare both three levels down, so the${0:A:h:h:h}root resolution still lands on the repo root — verified by running it from a different cwd.zarg_go, which this file doesn't have.Verify
I also reproduced CI's syntax loop locally in bash to confirm the moved file is still picked up, and re-ran the sweep from
/tmpto confirm path resolution.References updated in
lefthook.yml,.github/workflows/scripts.yml,scripts/README.mdandCHANGELOG.md; zarg's README gains a Tests section describing both.🤖 Generated with Claude Code
https://claude.ai/code/session_014CzNvwMVqrpyy2N1vhHQui