4 # gem zsh completion, based on homebrew completion
7 installed_gems=(${(f)"$(gem list --local --no-versions)"})
10 local -a _1st_arguments
13 'build:Build a gem from a gemspec'
14 'cert:Manage RubyGems certificates and signing settings'
15 'check:Check a gem repository for added or missing files'
16 'cleanup:Clean up old versions of installed gems in the local repository'
17 'contents:Display the contents of the installed gems'
18 'dependency:Show the dependencies of an installed gem'
19 'environment:Display information about the RubyGems environment'
20 'fetch:Download a gem and place it in the current directory'
21 'generate_index:Generates the index files for a gem server directory'
22 'help:Provide help on the `gem` command'
23 'install:Install a gem into the local repository'
24 'list:Display gems whose name starts with STRING'
25 'lock:Generate a lockdown list of gems'
26 'mirror:Mirror all gem files (requires rubygems-mirror)'
27 'outdated:Display all gems that need updates'
28 'owner:Manage gem owners on RubyGems.org.'
29 'pristine:Restores installed gems to pristine condition from files located in the gem cache'
30 'push:Push a gem up to RubyGems.org'
31 'query:Query gem information in local or remote repositories'
32 'rdoc:Generates RDoc for pre-installed gems'
33 'search:Display all gems whose name contains STRING'
34 'server:Documentation and gem repository HTTP server'
35 'sources:Manage the sources and cache file RubyGems uses to search for gems'
36 'specification:Display gem specification (in yaml)'
37 'stale:List gems along with access times'
38 'uninstall:Uninstall gems from the local repository'
39 'unpack:Unpack an installed gem to the current directory'
40 'update:Update installed gems to the latest version'
41 'which:Find the location of a library file you can require'
42 'yank:Remove a specific gem version release from RubyGems.org'
46 local -a gems installed_gems
49 '(-v --version)'{-v,--version}'[show version]' \
50 '(-h --help)'{-h,--help}'[show help]' \
51 '*:: :->subcmds' && return 0
53 if (( CURRENT == 1 )); then
54 _describe -t commands "gem subcommand" _1st_arguments
65 if [[ "$state" == forms ]]; then
67 _requested installed_gems expl 'installed gems' compadd -a installed_gems
71 _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;