From 5c7a239e16c856fa63b1cd5bca112dbe78d5dfb2 Mon Sep 17 00:00:00 2001 From: Colan Schwartz Date: Tue, 13 Jan 2015 11:36:10 -0500 Subject: [PATCH] Explained how to set up ZSH autocompletion in the docs. --- docs/configure.md | 4 ++-- drush.complete.sh | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/configure.md b/docs/configure.md index 25fd302920..edc74dea0b 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -7,8 +7,8 @@ Configure your .bashrc (or equivalent): source /path/to/drush/examples/example.bashrc * If you didn't source it the step above, see top of - [drush.complete.sh](https://raw.githubusercontent.com/drush-ops/drush/master/drush.complete.sh) file for instructions adding bash completion for drush - command to your shell. Once configured, completion works for site aliases, + [drush.complete.sh](https://raw.githubusercontent.com/drush-ops/drush/master/drush.complete.sh) file for instructions on adding completion for drush + commands to your shell. Once configured, completion works for site aliases, command names, shell aliases, global options, and command-specific options. * Optional. If [drush.complete.sh](https://raw.githubusercontent.com/drush-ops/drush/master/drush.complete.sh) is being sourced (ideally in diff --git a/drush.complete.sh b/drush.complete.sh index 533f3d16b6..cb93f2ed0a 100755 --- a/drush.complete.sh +++ b/drush.complete.sh @@ -4,6 +4,13 @@ # ~/.bash_completion or ~/.bash_profile files. Alternatively, source # examples/example.bashrc instead, as it will automatically find and source # this file. +# +# If you're using ZSH instead of BASH, add the following to your ~/.zshrc file +# and source it. +# +# autoload bashcompinit +# bashcompinit +# source /path/to/your/drush.complete.sh # Ensure drush is available. which drush > /dev/null || alias drush &> /dev/null || return