From f635c8715cd990fa6f066117c67240ac38ef9b46 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Fri, 28 Dec 2012 13:25:24 -0600 Subject: [PATCH] Add zsh support for completion of full command line --- completions/rbenv.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/completions/rbenv.zsh b/completions/rbenv.zsh index 4739ac1..c439c5a 100644 --- a/completions/rbenv.zsh +++ b/completions/rbenv.zsh @@ -5,14 +5,13 @@ fi compctl -K _rbenv rbenv _rbenv() { - local word words completions + local words completions read -cA words - word="${words[2]}" if [ "${#words}" -eq 2 ]; then completions="$(rbenv commands)" else - completions="$(rbenv completions "${word}")" + completions="$(rbenv completions ${words[2,-1]})" fi reply=("${(ps:\n:)completions}")