updated rvm completions

This commit is contained in:
Thomas Sänger 2013-10-08 07:19:03 +02:00
parent d992bd0ab9
commit 18c561ce6e
1 changed files with 30 additions and 40 deletions

View File

@ -3,57 +3,55 @@
# Description
# -----------
#
# Completion script for rvm (https://rvm.beginrescueend.com/).
# Completion script for rvm (https://rvm.io/).
#
# Source: https://github.com/wayneeseguin/rvm/blob/master/scripts/zsh/Completion/_rvm
# Source: https://github.com/wayneeseguin/rvm/blob/1.22.18/scripts/extras/completion.zsh/_rvm
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Bruno Michel (https://github.com/nono)
# * Thomas Sänger <HorayNarea@gmail.com> (https://github.com/HorayNarea)
#
# ------------------------------------------------------------------------------
local curcontext="$curcontext" state line cmds ret=1
typeset curcontext state line cmds ret
curcontext="$curcontext"
ret=1
_arguments -C \
'(- 1 *)'{-v,--version}'[display version information]' \
'(-l --level)'{-l,--level}'+[patch level to use with rvm use / install]:number' \
'--bin[path for binaries to be placed (~/.rvm/bin/)]:path:_files' \
'--source[src directory to use (~/.rvm/src/)]:path:_files' \
'--archives[directory for downladed files (~/.rvm/archives/)]:path:_files' \
'(-l|--level)'{-l,--level}'+[patch level to use with rvm use / install]:number' \
'(--bin)--bin[path for binaries to be placed (~/.rvm/bin/)]:path:_files' \
'(--source)--source[src directory to use (~/.rvm/src/)]:path:_files' \
'(--archives)--archives[directory for downladed files (~/.rvm/archives/)]:path:_files' \
'-S[Specify a script file to attempt to load and run (rubydo)]:file:_files' \
'-e[Execute code from the command line]:code' \
'-G[root gem path to use]:path:_files' \
'--gems[Used to set the gems_flag, use with remove to remove gems]' \
'--archive[Used to set the archive_flag, use with remove to remove archive]' \
'--patch[With MRI Rubies you may specify one or more full paths to patches]:paths:->patches' \
'(-C --configure)'{-C,--configure}'=[custom configure options]' \
'--nice[process niceness (for slow computers, default 0)]:number' \
'--ree-options[Options passed directly to ree ./installer on the command line]:options' \
'--head[with update, updates rvm to git head version]' \
'--rubygems[with update, updates rubygems for selected ruby]' \
'--default[with ruby select, sets a default ruby for new shells]' \
'--debug[Toggle debug mode on for very verbose output]' \
'--trace[Toggle trace mode on to see EVERYTHING rvm is doing]' \
'--force[Force install, even given ruby is already install]' \
'--summary[Used with rubydo to print out a summary of the commands run]' \
'--latest[with gemset --dump skips version strings for latest gem]' \
'--gems[with uninstall/remove removes gems with the interpreter]' \
'--docs[with install, attempt to generate ri after installation]' \
'--reconfigure[Force ./configure on install even if Makefile already exists]' \
'(-G)-G[root gem path to use]:path:_files' \
'(--gems)--gems[Used to set the gems_flag, use with remove to remove gems]' \
'(--archive)--archive[Used to set the archive_flag, use with remove to remove archive]' \
'(--patch)--patch[With MRI Rubies you may specify one or more full paths to patches]' \
'(-C|--configure)'{-C,--configure}'=[custom configure options]' \
'(--nice)--nice[process niceness (for slow computers, default 0)]:number' \
'(--ree)--ree-options[Options passed directly to ree ./installer on the command line]:options' \
'(--head)--head[with update, updates rvm to git head version]' \
'(--rubygems)--rubygems[with update, updates rubygems for selected ruby]' \
'(--default)--default[with ruby select, sets a default ruby for new shells]' \
'(--debug)--debug[Toggle debug mode on for very verbose output]' \
'(--trace)--trace[Toggle trace mode on to see EVERYTHING rvm is doing]' \
'(--force)--force[Force install, even given ruby is already install]' \
'(--summary)--summary[Used with rubydo to print out a summary of the commands run]' \
'(--latest)--latest[with gemset --dump skips version strings for latest gem]' \
'(--gems)--gems[with uninstall/remove removes gems with the interpreter]' \
'(--docs)--docs[with install, attempt to generate ri after installation]' \
'(--reconfigure)--reconfigure[Force ./configure on install even if Makefile already exists]' \
'(--quiet-curl)--quiet-curl[Makes curl silent when fetching data]' \
'1: :->cmds' \
'*: :->args' && ret=0
case $state in
patches)
compset -P '*,'
compset -S ',*'
_files -q -S ,
;;
cmds)
cmds=( ${(f)"$(_call_program commands rvm help 2> /dev/null | __rvm_sed -e '/^== Action/,/^== Implementation/!d; / :: /!d; s/^[ *]*\([^ ]*\) *:: *\(.*\)/\1:\2/')"} )
@ -117,11 +115,3 @@ case $state in
esac
return ret
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et