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