-
-
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
Argcomplete is not completing in ZSH when prefix is present #258
Comments
This looks like it's caused by the same bug I came across in the second half of #228, which would mean I wasn't entirely correct about it not affecting completions from the end of a line. Can you update zsh or manually apply the particular fix I describe there and see if it fixes your problem? |
I changed |
That is showing the value of I reproduced the problem using your script, made the modification (bashcompinit was located at It looks like the fix for this was first released in zsh 5.5. Perhaps it's worth adding this caveat to the proposed documentation change in #245. |
After some serious grepping I found the problem. I use https://github.com/aws/aws-cli/blob/develop/bin/aws_zsh_completer.sh which has a copy-paste version of |
No problem, thanks for working through this with me, and thanks for the detailed initial bug report - it really helped! |
I solved this problem by updating zsh from |
I use ZSH and in general bash completions work well enough. However there is a problem that is bothering me. I wouldn't mind looking into it, but I have no idea where to start. Consider the following piece of code:
When I save it to test.py, make it executable and run
eval "$(register-python-argcomplete test.py)"
I get completions, but only if there is no prefix present. For example./test.py <tab>
gives me--name
and the other arguments../test.py --name <tab>
gives me123
and145
. I'd expect the same with./test.py --name 1<tab>
but I don't get anything. It's the same with./test.py --n
. However, when I use subcommands, argcomplete does complete things when a prefix is present. When I enable debug, I get the following in ZSH:And this in BASH (where I do get completions too):
So apparently the prefix is not recognised as such. Any idea where the difference is coming from and how to fix it?
The text was updated successfully, but these errors were encountered: