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

Fish autocomplete stopped working on 8.1.4 #2567

Closed
peterdragun opened this issue Jul 18, 2023 · 5 comments
Closed

Fish autocomplete stopped working on 8.1.4 #2567

peterdragun opened this issue Jul 18, 2023 · 5 comments
Milestone

Comments

@peterdragun
Copy link
Contributor

Fish autocomplete stopped working in 8.1.4. By using git bisect I was able to identify fist commit that caused the issue - bcd3faa

I believe the issue was caused by removing line endings with ';'. Adding them back resolves issue for me.

When executing the eval (env _FOO_BAR_COMPLETE=fish_source foo-bar) I get fish: Expected end of the statement, but found end of the input

Environment:

  • Python version: 3.11.4
  • Click version: 8.1.4, 8.1.5
  • Fish version: 3.6.1
@davidism
Copy link
Member

Happy to review a PR.

@davidism
Copy link
Member

@exploide

@exploide
Copy link
Contributor

Oh no. I'm sorry causing that one. The problem is it depends how the generated completion scripts gets loaded.

# does indeed not work without ;
$ eval (env _FOO_BAR_COMPLETE=fish_source foo-bar)

# works
$ eval "$(env _FOO_BAR_COMPLETE=fish_source foo-bar)"

# also works
$ _FOO_BAR_COMPLETE=fish_source foo-bar | source

If you look in the fish repo, the source variant seems to be preferred. And the "$(...)" variant preserves newlines. Unfortunately the only non-working variant seems to be the documented one here. So it's of course fine if you add the ; back, though they are not idiomatic for fish.

@davidism
Copy link
Member

If all three work with semicolon, then it's probably best to use that as well as update the docs to use the most idiomatic approach.

@peterdragun
Copy link
Contributor Author

I have updated my PR to also include the update for docs to follow the fish repo recommendation.

@davidism davidism added this to the 8.1.7 milestone Aug 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants