Use Drush Autocomplete with Zsh

Update: I had the filename as, but the filename should now be Brent noticed this. The info below as been updated as such.

Brent Dunn pointed me to, which I didn't even know existed. Brent and I both wanted to give this a go in Zsh since we use oh-my-zsh, but is setup for bash.

I was able to get drush autocompletes working with Zsh thanks to this stack exchange post

  1. Save to your local file system
  2. Add the following to your ~/.zshrc file
    autoload bashcompinit
    source /path/to/your/
  3. Source the changes: $ source ~/.zshrc

Now you can enjoy drush autocompletions in zsh style! For example, $ drush sql followed by tab will give you a browsable list of all the drush sql related commands.


Blog Category: 


i only had to drop "auto"

i only had to drop "auto" from the source, so it reads "" and voila! i'll be using this right away, thanks!


bdone: You still may want to use bashcompinit since that is the way to have Zsh follow the complete bash spec. While Zsh is picking up the source file, it may not always work depending on implementation in the completion file.

This one is awesome, one

This one is awesome, one which I was looking for since long time!

Make sure you grab the raw

Make sure you grab the raw source from the github file, not save link as when you want to save the

Excellent, the only thing

Excellent, the only thing that doesn't work for me is autocomplete without a first letter for the option to insert, which is a little bit unfortunate, do you by any change know anything around that?

Not sure on that Dieter. I

Not sure on that Dieter. I can type drush and then a few characters, followed by tab and I get options. The only thing I notice is that I have to ctrl-c to start over. Backspacing doesn't reset the autocomplete.

process once again. This is

process once again. This is the most helpful attribute of xHubs Android application. video clips from your laptop computer, desktop, or smartphones.

Add new comment