From c2c10f98811ece8cd6ab61681cb59e1fd02aec05 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sat, 27 Aug 2011 19:14:55 -0400 Subject: [PATCH] Moved gem completion into Ruby plugin. --- plugins/{gem => ruby}/_gem | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename plugins/{gem => ruby}/_gem (94%) diff --git a/plugins/gem/_gem b/plugins/ruby/_gem similarity index 94% rename from plugins/gem/_gem rename to plugins/ruby/_gem index 83cba40d..8901492a 100644 --- a/plugins/gem/_gem +++ b/plugins/ruby/_gem @@ -1,9 +1,9 @@ #compdef gem #autoload -# gem zsh completion, based on homebrew completion +# This completion is based on the Homebrew completion. -_gem_installed() { +function _gem-installed() { installed_gems=(`gem list --local --no-versions`) } @@ -55,10 +55,11 @@ fi case "$words[1]" in list) if [[ "$state" == forms ]]; then - _gem_installed + _gem-installed _requested installed_gems expl 'installed gems' compadd -a installed_gems fi ;; uninstall|update) - _gem_installed + _gem-installed _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;; esac +