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

zsh auto completion #5

a8 opened this issue Dec 22, 2012 · 2 comments


None yet
3 participants
Copy link

commented Dec 22, 2012


On Twitter @solarce asked for zsh support of the bash auto completion. He's not the only one ;-).
Luckily, zsh has a bash completion mode. Unfortunately, it seems to be broken.

Here's the steps necessary:

  1. put this in your .zshrc after compinit
autoload -U bashcompinit
  1. Set up
complete -C aws_completer aws

If your zsh bashcompinit works that should be it.

If not, you need to extend the zsh bashcompinit _bash_complete() function to export COMP_POINT and COMP_LINE.
That is the diff against the zsh v5.0 file.

>   export COMP_POINT
>   export COMP_LINE

IMHO, it would be better to add a zsh completion that is evaluated when the shell is started. That completion config is kept in zsh RAM until the shell is terminated. The benefit is that the Python interpreter does not have to be started each time one hits . I'll give that a try after Christmas. Not sure if I get it done since I haven't written such a zsh compdef function so far.


This comment has been minimized.

Copy link

commented Dec 23, 2012

@a8 would be awesome. Thanks for the #protip


This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2013

I made the zsh completion work for zsh using the bash compatibility mode of zsh. It's here. I tested the Mac Mountain Lion shipped zsh, upstream zsh 5.0.2 and zsh 4.3.17 Ubuntu 12.04. In order to work around the issue described above I copied the just applied zsh fix or on the github clone.

It works. To make use of the greatness of zsh I will try to write a proper zsh compdef function in the next weeks. First I have to learn a little more about zsh ;-)

I'm not sure if it is worth to send a pull request for that one here.

@garnaat garnaat closed this Feb 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.