From 0c7823b4a5ddc2059a1088e00584e0701fd4d14b Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Wed, 15 Apr 2015 19:53:27 -0700 Subject: [PATCH] Add zsh completion instructions (fix #1420) --- docs/reference/cli.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/reference/cli.rst b/docs/reference/cli.rst index 8923a6a5c..d3fc9fd68 100644 --- a/docs/reference/cli.rst +++ b/docs/reference/cli.rst @@ -417,7 +417,20 @@ Completion of plugin commands only works for those plugins that were enabled when running ``beet completion``. If you add a plugin later on you will want to re-generate the script. -If you use zsh, take a look instead at the included `completion script`_. +zsh +``` + +If you use zsh, take a look at the included `completion script`_. + +Another approach is to use zsh's bash completion compatibility. This snippet +defines some bash-specific functions to make this work without errors:: + + autoload bashcompinit + bashcompinit + _get_comp_words_by_ref() { :; } + compopt() { :; } + _filedir() { :; } + eval "$(beet completion)" .. _completion script: https://github.com/sampsyo/beets/blob/master/extra/_beet