refactor!: :ZPack with subcommands#22
Merged
Merged
Conversation
zuqini
approved these changes
May 17, 2026
zuqini
left a comment
Owner
There was a problem hiding this comment.
LGTM, thank you for the contribution!
zuqini
added a commit
that referenced
this pull request
May 17, 2026
Non-blocking issues surfaced while reviewing the :ZPack subcommand refactor and its cmd_prefix deprecation shim. commands.lua: - complete_command strips the command word explicitly, so a bang-attached subcommand (:ZPack!load) no longer mis-parses and offers subcommand names at the plugin-name position - the dispatcher rejects a bang on subcommands that ignore it (update/restore/clean), restoring the feedback the old :ZUpdate! E477 gave - the dispatcher rejects extra positional args instead of joining them into a misleading 'Plugin "a b" not found in spec' error - validate_name type-checks its input, so a non-string cmd_prefix/cmd_name no longer throws and aborts setup() - setup_legacy threads the resolved cmd_name into legacy command descs and warnings instead of hardcoding :ZPack - setup_legacy emits an error notice for an invalid cmd_prefix instead of returning silently - a startup assert keeps SUB_ORDER in sync with the Sub table - the cmd_prefix deprecation warning dedups once total, not once per command tests: - repurpose cmd_prefix_test.lua as an explicit legacy-shim test: rename the describe block, assert the deprecation warning fires, drop the rejection cases duplicated by cmd_name_test.lua, and fix delete_zpack_commands cleanup calls that passed the prefix as the cmd_name positional - add dispatch_test.lua covering the bang/extra-arg/completion fixes - deprecation_test asserts the warning dedups across different legacy commands - drop the :ZPack-creation test duplicated from cmd_name_test.lua
sairyy
added a commit
to sairyy/zshow.nvim
that referenced
this pull request
May 19, 2026
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.
Hmm, Messed up the branch the other PR was closed ...
This PR contains all the things discussed in #21