3 local curcontext="$curcontext" state line _gems _opts ret=1
 
   5 _arguments -C -A "-v" -A "--version" \
 
   6         '(- 1 *)'{-v,--version}'[display version information]' \
 
  12                 _values "bundle command" \
 
  13                         "install[Install the gems specified by the Gemfile or Gemfile.lock]" \
 
  14                         "update[Update dependencies to their latest versions]" \
 
  15                         "package[Package the .gem files required by your application]" \
 
  16                         "exec[Execute a script in the context of the current bundle]" \
 
  17                         "config[Specify and read configuration options for bundler]" \
 
  18                         "check[Determine whether the requirements for your application are installed]" \
 
  19                         "list[Show all of the gems in the current bundle]" \
 
  20                         "show[Show the source location of a particular gem in the bundle]" \
 
  21                         "console[Start an IRB session in the context of the current bundle]" \
 
  22                         "open[Open an installed gem in the editor]" \
 
  23                         "viz[Generate a visual representation of your dependencies]" \
 
  24                         "init[Generate a simple Gemfile, placed in the current directory]" \
 
  25                         "gem[Create a simple gem, suitable for development with bundler]" \
 
  26                         "help[Describe available tasks or one specific task]"
 
  50                                         '(--no-color)--no-color[disable colorization in output]' \
 
  51                                         '(--local)--local[do not attempt to connect to rubygems.org]' \
 
  52                                         '(--quiet)--quiet[only output warnings and errors]' \
 
  53                                         '(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
 
  54                                         '(--system)--system[install to the system location]' \
 
  55                                         '(--deployment)--deployment[install using defaults tuned for deployment environments]' \
 
  56                                         '(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
 
  57                                         '(--path)--path=-[specify a different path than the system default]:path:_files' \
 
  58                                         '(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
 
  59                                         '(--without)--without=-[exclude gems that are part of the specified named group]:groups'
 
  66                                 _gems=( $(bundle show 2> /dev/null | sed -e '/^  \*/!d; s/^  \* \([^ ]*\) .*/\1/') )
 
  67                                 if [[ $_gems != "" ]]; then
 
  68                                         _values 'gems' $_gems && ret=0
 
  72                                 _opts=(  $(bundle help $line[1] | sed -e '/^  \[-/!d; s/^  \[\(-[^=]*\)=.*/\1/') )
 
  73                                 _opts+=( $(bundle help $line[1] | sed -e '/^  -/!d; s/^  \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
 
  74                                 if [[ $_opts != "" ]]; then
 
  75                                         _values 'options' $_opts && ret=0