-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Document ephemeral vs. permanent completion activation #450
Comments
There's a few things you can do to trouble shoot here.
|
Thanks for your answer.
This is the script automatically generated by pip:
|
I think I must in fact use option So, I tried Having no feedback when executing the command in bash makes the debugging difficult... :( Any idea or suggestion ? |
I converted my script to not use absolute imports, so I also tried to change directory, and execute |
Hello, thanks for your interest in argcomplete. Have you tried following the suggestions in https://github.com/kislyuk/argcomplete#debugging? |
Thanks a lot for your suggestion. I've tried it already, but tried again in case I missed something. While I'm a long time python and Linux user, I've very few notions of bash, but I suppose the following should be enough ?
If so, there's still absolutely no message displayed in the shell. No message either when opening a new shell after that, executing Did I make something wrong, or is there something else I can try ? |
I noticed also that I can put anything as (However, if I use an invalid option name like |
You have to run all of those commands in the same shell:
|
Thanks a lot for your help !
OK, this was indeed the reason it failed. After executing Thanks again ! May I suggest you a few improvements, by the way ? It would be really nice from I thought |
For anyone else reading this thread in the future, one point not obvious from the doc, though it makes sense, is that the completion will only be enabled in the current shell. So, you'll have to append the command Alternatively, to avoid launching a python process at every shell startup, one may execute |
You shouldn't need to use Can you try this and post the output please?
|
Interesting, this works now without using The initial failure may then have been caused by the fact that, initially, It's the only explanation I can see... |
If your script was executable as
It probably wouldn't hurt to add this to the doc, since I agree it's not currently obvious that it only lasts for the life of the current shell. |
Hi,
Thanks for this great library.
When trying to activate completion for my script, nothing happens: no error raised, but when starting a new terminal, completion simply doesn't work.
I can enable completion globally yet (using
activate-global-python-argcomplete
).Command launched in bash:
eval "$(register-python-argcomplete mcq)"
(wheremcq
is my own command).My configuration:
source ~/.py/bin/activate
in my.bashrc
, where.py
is my venv)My script: https://www.toptal.com/developers/paste-gd/ZgOSfr3n
I first tried to activate completion through a python script, then directly in bash with
eval "$(register-python-argcomplete mcq)"
, but no success. :(I'd like to activate autocompletion only for the command
mcq
, and not for all python scripts.The text was updated successfully, but these errors were encountered: