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 "info[Show details of a particular gem in the bundle]" \
22 "outdated[Show all of the outdated gems in the current bundle]" \
23 "console[Start an IRB session in the context of the current bundle]" \
24 "open[Open an installed gem in the editor]" \
25 "viz[Generate a visual representation of your dependencies]" \
26 "init[Generate a simple Gemfile, placed in the current directory]" \
27 "gem[Create a simple gem, suitable for development with bundler]" \
28 "platform[Displays platform compatibility information]" \
29 "clean[Cleans up unused gems in your bundler directory]" \
30 "help[Describe available tasks or one specific task]"
56 '(--no-color)--no-color[disable colorization in output]' \
57 '(--local)--local[do not attempt to connect to rubygems.org]' \
58 '(--quiet)--quiet[only output warnings and errors]' \
59 '(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
60 '(--system)--system[install to the system location]' \
61 '(--deployment)--deployment[install using defaults tuned for deployment environments]' \
62 '(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
63 '(--path)--path=-[specify a different path than the system default]:path:_files' \
64 '(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
65 '(--without)--without=-[exclude gems that are part of the specified named group]:groups'
73 '(--force)--force[forces clean even if --path is not set]' \
74 '(--dry-run)--dry-run[only print out changes, do not actually clean gems]' \
75 '(--no-color)--no-color[Disable colorization in output]' \
76 '(--verbose)--verbose[Enable verbose output mode]'
81 '(--pre)--pre[Check for newer pre-release gems]' \
82 '(--source)--source[Check against a specific source]' \
83 '(--local)--local[Do not attempt to fetch gems remotely and use the gem cache instead]' \
84 '(--no-color)--no-color[Disable colorization in output]' \
85 '(--verbose)--verbose[Enable verbose output mode]'
89 _gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
90 if [[ $_gems != "" ]]; then
91 _values 'gems' $_gems && ret=0
95 _opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
96 _opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
97 if [[ $_opts != "" ]]; then
98 _values 'options' $_opts && ret=0