Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix terminal suggest bug where unexpected completions are returned #242363

Merged
merged 4 commits into from
Mar 3, 2025

Conversation

meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Feb 28, 2025

  • We were adding the spec completion item even when there was no matching available command because of a startsWith check - for example,python3.13 in availableCommands would be the reason we add the python spec as a command completion. Now, we ensure there's an exact match. for python, this means it won't show up unless a user has defined that alias.
  • We were checking if specLabel === command.label when command.label can be an object.
  • We weren't hiding the widget when there are 0 provided completions when not manually invoked, IE typing ./, so it would stick around with the latest model's values.

fixes #241909
fixes #241964

@meganrogge meganrogge requested a review from Tyriar February 28, 2025 21:29
@meganrogge meganrogge self-assigned this Feb 28, 2025
@meganrogge meganrogge added this to the March 2025 milestone Feb 28, 2025
@meganrogge meganrogge changed the title fixes #241909 fix terminal suggest bug where unexpected completions are returned Feb 28, 2025
Tyriar
Tyriar previously approved these changes Mar 3, 2025
@meganrogge meganrogge requested a review from Tyriar March 3, 2025 21:46
@meganrogge meganrogge enabled auto-merge (squash) March 3, 2025 21:46
@meganrogge meganrogge merged commit 12dafaf into main Mar 3, 2025
8 checks passed
@meganrogge meganrogge deleted the merogge/partial-fix branch March 3, 2025 22:56
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.

Getting executable completions when typing snap install| Path completion sometimes replaces command
3 participants