Merge pull request #108 from spk/_gem_push

Added gem push completion.
This commit is contained in:
Julien Nicoulaud 2012-10-01 10:40:12 -07:00
commit 5031fbd255
1 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,7 @@ _gem() {
"mirror[Mirror a gem repository]" \
"outdated[Display all gems that need updates]" \
"pristine[Restores installed gems to pristine condition from files located in the gem cache]" \
"push[Push a gem up to RubyGems.org]" \
"query[Query gem information in local or remote repositories]" \
"rdoc[Generates RDoc for pre-installed gems]" \
"search[Display all gems whose name contains STRING]" \
@ -93,6 +94,7 @@ __gem_help_arguments() {
"mirror"
"outdated"
"pristine"
"push"
"query"
"rdoc"
"search"
@ -301,6 +303,14 @@ _gem_pristine() {
$gem_general_flags && ret=0
}
_gem_push() {
_arguments \
"*:URI: _alternative 'files:file:_files -g *.gem'" \
"(-k --key)"{-k,--key}"[Use the given API key from ~/.gem/credentials]" \
"--host[Push to another gemcutter-compatible host]" \
$gem_general_flags && ret=0
}
_gem_query() {
_arguments \
"(-i --no-installed)"{-i,--no-installed}"[Check for installed gem]" \