Skip to content

fix completion strategy blocking fallback to history#841

Open
thaisonzdx wants to merge 1 commit intozsh-users:masterfrom
thaisonzdx:master
Open

fix completion strategy blocking fallback to history#841
thaisonzdx wants to merge 1 commit intozsh-users:masterfrom
thaisonzdx:master

Conversation

@thaisonzdx
Copy link
Copy Markdown

When using ZSH_AUTOSUGGEST_STRATEGY=(completion history), the completion strategy would prevent fallback to history even when no completions were found. The completion strategy returned the original input as the suggestion when no completions existed, causing the strategy loop to exit early instead of trying the next strategy.

I added a check to unset suggestion if it equals the input. Now the history strategy is properly tried when completion finds nothing.

When completion finds no results, unset suggestion to allow the next
strategy to run instead of blocking with the original input text.
@thaisonzdx thaisonzdx marked this pull request as draft November 3, 2025 07:13
@thaisonzdx thaisonzdx marked this pull request as ready for review November 3, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant