fix(completions): preserve _abbr completion function [#210] - #211
Open
ybiquitous wants to merge 2 commits into
Open
fix(completions): preserve _abbr completion function [#210]#211ybiquitous wants to merge 2 commits into
ybiquitous wants to merge 2 commits into
Conversation
The `unfunction -m _abbr` in the post-init cleanup was clobbering the shipped completion function `completions/_abbr` that the user's `compinit` had autoloaded. The plugin never defines a function named `_abbr` itself.
2 tasks
olets
requested changes
May 10, 2026
olets
left a comment
Owner
There was a problem hiding this comment.
Thanks for adding a test 💯
Couple inline suggestions, because I'm fine relying on the commit message to reference the bug report (as you did) - no need to tag it in the code.
And one inline question.
| # Autoload the shipped completion function (regression guard for #210). | ||
| # The fpath addition persists for the rest of the suite; harmless. | ||
| fpath=( $abbr_dir/completions $fpath ) | ||
| autoload -Uz _abbr |
Owner
There was a problem hiding this comment.
Necessary? (Still afk, otherwise I'd check!)
Author
There was a problem hiding this comment.
Yes, ztr test '(( $+functions[_abbr] ))' checks only true after autoload -Uz _abbr marks function. But there may be another better way.
Co-authored-by: Henry Bley-Vroman <bley.vroman@gmail.com>
Author
|
Hi @olets, this is a friendly reminder. |
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.
Fixes #210
The
unfunction -m _abbrin the post-init cleanup was clobbering the shipped completion functioncompletions/_abbrthat the user'scompinithad autoloaded. The plugin never defines a function named_abbritself.