Replies: 2 comments 1 reply
-
|
@davidism I am curious why the original bug report was converted into a discussion without any explanation, especially as it did not look a poorly described. I found myself being hit by the save bug many months after. Doing a simple search on source code, is not hard to see how an unhandled exception might occur when |
Beta Was this translation helpful? Give feedback.
-
|
The issue is ultimately brain malfunction while consuming the docs. Don't ask me how I know 😂 The docs tell (also in 2023) to use _FOO_BAR_COMPLETE=bash_sourcehowever as we can see, in this issue report |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to enable shell completion to a Python CLI app that does not use setuptools.
I'm on Ubuntu, using Poetry to handle deps, and PyInstaller to build a binary, AFAICT everything should be pretty vanilla.
If I understand correctly, it seems
COMP_WORDSis supposed to be an env var populated by shell completion, but who makes it and how/when its consumed isn't yet clear to me.It seems either I found found a bug in Click, or I'm misunderstanding the problem. If this is not actually a Click bug, apologies, I will close as appropriate.
minimal repro
example.py
Binary built in the expected way, so far so good 🎉
Run it manually like this:
Now we attempt to enable the completion, per the docs:
It's my first time using this feature so I'm not sure what to expect exactly (i think some bash?) but definitely not an error. Did I fail to provide something?
Thanks for any pointers :)
Environment
Beta Was this translation helpful? Give feedback.
All reactions