Repository navigation
Conversation
With complete_in_word, compstate[unambiguous] holds the whole word, including the text after the cursor. The early exit compared it with the text before the cursor only, so it always inserted the unchanged word and fzf never opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
njhoffman
added a commit
to njhoffman/fzf-tab
that referenced
this pull request
Nov 22, 2026
… picker (upstream PR Aloxaf#603) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
al-bashkir
pushed a commit
to al-bashkir/fzf-tab
that referenced
this pull request
Nov 23, 2026
In `tst "foo bar<Tab>` with matches `foo bar1` and `foo bar2`, zsh sets compstate[unambiguous] to `"foo bar`, with no closing quote. The fast-path check compares it with `"foo bar"` (since Aloxaf#448), finds a difference and inserts the same text again, so fzf never opens. Compare with and without the closing quote. Builds on Aloxaf#603: the compared word keeps its $SUFFIX$ISUFFIX, and a test covers an unclosed quote with text after the cursor.
al-bashkir
added a commit
to al-bashkir/fzf-tab
that referenced
this pull request
Nov 23, 2026
In `tst "foo bar<Tab>` with matches `foo bar1` and `foo bar2`, zsh sets compstate[unambiguous] to `"foo bar`, with no closing quote. The fast-path check compares it with `"foo bar"` (since Aloxaf#448), finds a difference and inserts the same text again, so fzf never opens. Compare with and without the closing quote. Builds on Aloxaf#603: the compared word keeps its $SUFFIX$ISUFFIX, and a test covers an unclosed quote with text after the cursor.
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.
With
complete_in_word, Tab inside a word that has several matches does nothing: fzf never opens, and pressing Tab again repeats the no-op.Reproduce (
zsh -f, onlycompinit,setopt complete_in_word, fzf-tab):Expected: fzf with
ab1x,ab2x(what zsh lists withdisable-fzf-tab). Actual: nothing.Cause:
compstate[unambiguous]holds the whole word, including the text after the cursor (abx). The early exit in-ftb-completecompares it with$IPREFIX$PREFIX(ab), so it always looks like there is a prefix to insert. It then inserts the unchanged word and returns.Fix: include
$SUFFIX$ISUFFIXin the comparison. Adds a ztst case, "unambiguous prefix with suffix after cursor". The suite passes.Possibly related: #456.
🤖 Generated with Claude Code