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

complete: fix condition to suppress variable autocompletion #9753

Merged

Conversation

Xiretza
Copy link
Contributor

@Xiretza Xiretza commented Apr 25, 2023

This makes the code behave like the comment describes; if that's not actually the intended behaviour, I'll change the comment instead.

@ridiculousfish
Copy link
Member

Yep it's a good fix! The intention of this code is to not autosuggest with a bare $. Consider:

echo $

fish has no idea what the user will type next, so it offers nothing at all. This happens to work with a single $, but the test fails for more than one:

echo $PATH $

here fish autosuggests something (the first variable, alphabetically) and the reason is the bug you found. Very well spotted.

@ridiculousfish ridiculousfish merged commit b76e6c5 into fish-shell:master Apr 26, 2023
6 of 7 checks passed
@ridiculousfish
Copy link
Member

I don't think this is worth a changelog but it's a good fix. Thank you!!

@mqudsi mqudsi added this to the fish 3.6.2 milestone Apr 26, 2023
@Xiretza Xiretza deleted the autocomplete-suppress-variables branch April 29, 2023 10:22
@faho faho added the bug Something that's not working as intended label Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants