-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Autocomplete after the eol command #216
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Thanks for this!
Is |
Hello
Sorry no 😓 , it should be replaced by |
Thanks, so does the |
@hugovk the use of |
The ❯ activate-global-python-argcomplete
Defaulting to system-wide installation.
Installing /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/argcomplete/bash_completion.d/_python-argcomplete to /opt/homebrew/share/zsh/site-functions/_python-argcomplete...
Installed.
Installing /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/argcomplete/bash_completion.d/_python-argcomplete to /opt/homebrew/etc/bash_completion.d/python-argcomplete...
Installed.
Please restart your shell or source the installed file to activate it. And opened a new shell, but it's not completing: ❯ eol ne Do you know why? |
Works on my side on new shell but only after I added the flag
|
Yes: ❯ head --lines 2 src/norwegianblue/cli.py
#!/usr/bin/env python3
# PYTHON_ARGCOMPLETE_OK
❯ pip install -e . --quiet
❯ eol ne<tab> New terminal tab: ❯ eol ne<tab> |
Sorry for that. The script
Seems that on your side it's installed at the following locations:
Could you please try to source the one corresponding to your shell to check if it exists and if it solves the problem? source /opt/homebrew/share/zsh/site-functions/_python-argcomplete |
That's right.
Yes, that works. |
I don't know why it is not sourced automatically by your shell 🤔? |
I've no idea...
❯ locate _python-argcomplete
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/argcomplete/bash_completion.d/_python-argcomplete
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/argcomplete/bash_completion.d/_python-argcomplete
/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/argcomplete/bash_completion.d/_python-argcomplete
/opt/homebrew/Cellar/pipx/1.6.0/libexec/lib/python3.12/site-packages/argcomplete/bash_completion.d/_python-argcomplete
/opt/homebrew/share/zsh/site-functions/_python-argcomplete
❯ which activate-global-python-argcomplete
/Library/Frameworks/Python.framework/Versions/3.13/bin/activate-global-python-argcomplete But when I run it, it installs from 3.13 to a Homebrew path: ❯ activate-global-python-argcomplete
Defaulting to system-wide installation.
Installing /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/argcomplete/bash_completion.d/_python-argcomplete to /opt/homebrew/share/zsh/site-functions/_python-argcomplete...
Installed.
Installing /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/argcomplete/bash_completion.d/_python-argcomplete to /opt/homebrew/etc/bash_completion.d/python-argcomplete...
Installed.
Please restart your shell or source the installed file to activate it. I don't use Homebrew Python for anything other than letting Homebrew manage it for its own use, so it feels like a bug that the 3.13 Anyway, it also works if I source that 3.13 one in a new tab. What do you suggest? Should I add manual sourcing of that to my |
|
Yes, it's the first (and second) entry in my |
Hello,
This is a draft to resolve #125.
As the project is using argparse, I thought it was a good idea to use argcomplete.
This implementation is very simple but it seems to do the trick.
Cheers 🍰