feat(adds-on): add warning messages for shell completion injection failures#28
Merged
Conversation
…ilures This pull request enhances the shell completion injection logic by adding safety checks and user-facing warnings when injection points are not found. The changes improve robustness and debuggability when the underlying completion format changes. **Shell completion injection improvements:** * Added validation checks in `inject_bash()` to detect when the bash completion injection point is not found, with a warning message to inform users that plugin completions were skipped * Enhanced `inject_zsh()` with similar validation to detect missing zsh completion injection points and warn users accordingly * Updated `inject_zsh_dispatch()` to validate dispatch injection points for each plugin and emit warnings when injection fails for specific plugins * Improved `inject_nushell()` to check injection success for each plugin individually and warn when nushell completion injection points are not found **Code quality improvements:** * Extracted repeated string literals into `needle` variables for better readability and maintainability across all injection functions * Restructured replacement logic to compare results before and after injection, enabling detection of failed injections
benbenbang
enabled auto-merge (squash)
March 28, 2026 10:44
|
🎉 This PR is included in version 2.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
This pull request enhances the shell completion injection logic by adding safety checks and user-facing warnings when injection points are not found. The changes improve robustness and debuggability when the underlying completion format changes.
Shell completion injection improvements:
inject_bash()to detect when the bash completion injection point is not found, with a warning message to inform users that plugin completions were skippedinject_zsh()with similar validation to detect missing zsh completion injection points and warn users accordinglyinject_zsh_dispatch()to validate dispatch injection points for each plugin and emit warnings when injection fails for specific pluginsinject_nushell()to check injection success for each plugin individually and warn when nushell completion injection points are not foundCode quality improvements:
needlevariables for better readability and maintainability across all injection functions