fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
7eb254f2b
master
1# Completions for rubygem's `gem' command 2 3# Author: Tassilo Horn <tassilo@member.fsf.org> 4 5##### 6# Global options 7complete -c gem -n __fish_use_subcommand -s h -l help -d"Print usage informations and quit" 8complete -c gem -n __fish_use_subcommand -s v -l version -d"Print the version and quit" 9 10##### 11# Subcommands 12complete -c gem -n __fish_use_subcommand -xa build -d"Build a gem from a gemspec" 13complete -c gem -n __fish_use_subcommand -xa cert -d"Adjust RubyGems certificate settings" 14complete -c gem -n __fish_use_subcommand -xa check -d"Check installed gems" 15complete -c gem -n __fish_use_subcommand -xa cleanup -d"Cleanup old versions of installed gems in the local repository" 16complete -c gem -n __fish_use_subcommand -xa contents -d"Display the contents of the installed gems" 17complete -c gem -n __fish_use_subcommand -xa dependency -d"Show the dependencies of an installed gem" 18complete -c gem -n __fish_use_subcommand -xa environment -d"Display RubyGems environmental information" 19complete -c gem -n __fish_use_subcommand -xa fetch -d"Download a gem into current directory" 20complete -c gem -n __fish_use_subcommand -xa help -d"Provide help on the 'gem' command" 21complete -c gem -n __fish_use_subcommand -xa install -d"Install a gem into the local repository" 22complete -c gem -n __fish_use_subcommand -xa list -d"Display all gems whose name starts with STRING" 23complete -c gem -n __fish_use_subcommand -xa query -d"Query gem information in local or remote repositories" 24complete -c gem -n __fish_use_subcommand -xa rdoc -d"Generates RDoc for pre-installed gems" 25complete -c gem -n __fish_use_subcommand -xa search -d"Display all gems whose name contains STRING" 26complete -c gem -n __fish_use_subcommand -xa specification -d"Display gem specification (in YAML)" 27complete -c gem -n __fish_use_subcommand -xa uninstall -d"Uninstall a gem from the local repository" 28complete -c gem -n __fish_use_subcommand -xa unpack -d"Unpack an installed gem to the current directory" 29complete -c gem -n __fish_use_subcommand -xa update -d"Update the named gem or all installed gems in the local repository" 30 31##### 32# Subcommand switches 33 34# common opts 35set -l common_opt -c gem -n'not __fish_use_subcommand' 36complete $common_opt -l source -d"Use URL as the remote source for gems" -x 37complete $common_opt -s p -l http-proxy -d"Use the given HTTP proxy for remote operations" -x 38complete $common_opt -l no-http-proxy -d"Use no HTTP proxy for remote operations" 39complete $common_opt -s h -l help -d"Get help on this command" 40complete $common_opt -s v -l verbose -d"Set the verbose level of output" 41complete $common_opt -l config-file -d"Use this config file instead of default" -x 42complete $common_opt -l backtrace -d"Show stack backtrace on errors" 43complete $common_opt -l debug -d"Turn on Ruby debugging" 44 45## 46# cert 47set -l cert_opt -c gem -n'contains cert (commandline -pxc)' 48complete $cert_opt -s a -l add -d"Add a trusted certificate" -x 49complete $cert_opt -s l -l list -d"List trusted certificates" 50complete $cert_opt -s r -l remove -d"Remove trusted certificates containing STRING" -x 51complete $cert_opt -s b -l build -d"Build private key and self-signed certificate for EMAIL_ADDR" -x 52complete $cert_opt -s C -l certificate -d"Certificate for --sign command" -x 53complete $cert_opt -s K -l private-key -d"Private key for --sign command" -x 54complete $cert_opt -s s -l sign -d"Sign a certificate with my key and certificate" -x 55 56## 57# check 58set -l check_opt -c gem -n'contains check (commandline -pxc)' 59complete $check_opt -s v -l verify -d"Verify gem file against its internal checksum" -x 60complete $check_opt -s a -l alien -d"Report 'unmanaged' or rogue files in the gem repository" 61complete $check_opt -s t -l test -d"Run unit tests for gem" 62complete $check_opt -s V -l version -d"Specify version for which to run unit tests" 63 64## 65# cleanup 66set -l cleanup_opt -c gem -n'contains cleanup (commandline -pxc)' 67complete $cleanup_opt -s d -l dryrun -d"Don't really cleanup" 68 69## 70# contents 71set -l contents_opt -c gem -n'contains contents (commandline -pxc)' 72complete $contents_opt -s l -l list -d"List the files inside a Gem" 73complete $contents_opt -s V -l version -d"Specify version for gem to view" 74complete $contents_opt -s s -l spec-dir -d"Search for gems under specific paths" -x 75complete $contents_opt -s v -l verbose -d"Be verbose when showing status" 76 77## 78# dependency 79set -l dep_opt -c gem -n'contains dependency (commandline -pxc)' 80complete $dep_opt -s v -l version -d"Specify version of gem to uninstall" -x 81complete $dep_opt -s r -l reverse-dependencies -d"Include reverse dependencies in the output" 82complete $dep_opt -l no-reverse-dependencies -d"Don't include reverse dependencies in the output" 83complete $dep_opt -s p -l pipe -d"Pipe Format (name --version ver)" 84 85## 86# environment 87set -l env_opt -c gem -n'contains environment (commandline -pxc)' 88complete $env_opt -xa"packageversion\t'display the package version' gemdir\t'display the path where gems are installed' gempath\t'display path used to search for gems' version\t'display the gem format version' remotesources\t'display the remote gem servers'" 89 90set -l fetch_opt -c gem -n'contains fetch (commandline -pxc)' 91complete $fetch_opt -s v -l version -d"Specify version of gem to download" -x 92 93## 94# help 95set -l help_opt -c gem -n'contains help (commandline -pxc)' 96complete $help_opt -xa"commands\t'list all gem commands' examples\t'show some examples of usage' build cert check cleanup contents dependency environment help install list query rdoc search specification uninstall unpack update" 97 98## 99# install 100set -l install_opt -c gem -n'contains install (commandline -pxc)' 101complete $install_opt -s v -l version -d"Specify version of gem to install" -x 102complete $install_opt -s l -l local -d"Restrict operations to the LOCAL domain (default)" 103complete $install_opt -s r -l remote -d"Restrict operations to the REMOTE domain" 104complete $install_opt -s b -l both -d"Allow LOCAL and REMOTE operations" 105complete $install_opt -s i -l install-dir -d"Gem repository directory to get installed gems" -x 106complete $install_opt -s i -l user-install -d"Install in user's home directory instead of GEM_HOME." 107complete $install_opt -s N -l no-document -d"Disable documentation generation on install" 108complete $install_opt -l document -a'(__fish_append , rdoc ri)' -d"Specify the documentation types you wish to generate" 109complete $install_opt -s f -l force -d"Force gem to install, bypassing dependency checks" 110complete $install_opt -l no-force -d"Don't force gem to install, bypassing dependency checks" 111complete $install_opt -s t -l test -d"Run unit tests prior to installation" 112complete $install_opt -l no-test -d"Don't run unit tests prior to installation" 113complete $install_opt -s w -l wrappers -d"Use bin wrappers for executables" 114complete $install_opt -l no-wrappers -d"Don't use bin wrappers for executables" 115complete $install_opt -s P -l trust-policy -d"Specify gem trust policy" -x 116complete $install_opt -l ignore-dependencies -d"Do not install any required dependent gems" 117complete $install_opt -s y -l include-dependencies -d"Unconditionally install the required dependent gems" 118 119## 120# list 121set -l list_opt -c gem -n'contains list (commandline -pxc)' 122complete $list_opt -s d -l details -d"Display detailed information of gem(s)" 123complete $list_opt -l no-details -d"Don't display detailed information of gem(s)" 124complete $list_opt -s l -l local -d"Restrict operations to the LOCAL domain (default)" 125complete $list_opt -s r -l remote -d"Restrict operations to the REMOTE domain" 126complete $list_opt -s b -l both -d"Allow LOCAL and REMOTE operations" 127 128## 129# query 130set -l query_opt -c gem -n'contains query (commandline -pxc)' 131complete $query_opt -s n -l name-matches -d"Name of gem(s) to query on matches the provided REGEXP" -x 132complete $query_opt -s d -l details -d"Display detailed information of gem(s)" 133complete $query_opt -l no-details -d"Don't display detailed information of gem(s)" 134complete $query_opt -s l -l local -d"Restrict operations to the LOCAL domain (default)" 135complete $query_opt -s r -l remote -d"Restrict operations to the REMOTE domain" 136complete $query_opt -s b -l both -d"Allow LOCAL and REMOTE operations" 137 138## 139# rdoc 140set -l rdoc_opt -c gem -n'contains rdoc (commandline -pxc)' 141complete $rdoc_opt -l all -d"Generate RDoc/RI documentation for all installed gems" 142complete $rdoc_opt -l rdoc -d"Include RDoc generated documents" 143complete $rdoc_opt -l no-rdoc -d"Don't include RDoc generated documents" 144complete $rdoc_opt -l ri -d"Include RI generated documents" 145complete $rdoc_opt -l no-ri -d"Don't include RI generated documents" 146complete $rdoc_opt -s v -l version -d"Specify version of gem to rdoc" -x 147 148## 149# search 150set -l search_opt -c gem -n'contains search (commandline -pxc)' 151complete $search_opt -s d -l details -d"Display detailed information of gem(s)" 152complete $search_opt -l no-details -d"Don't display detailed information of gem(s)" 153complete $search_opt -s l -l local -d"Restrict operations to the LOCAL domain (default)" 154complete $search_opt -s r -l remote -d"Restrict operations to the REMOTE domain" 155complete $search_opt -s b -l both -d"Allow LOCAL and REMOTE operations" 156 157## 158# specification 159set -l specification_opt -c gem -n'contains specification (commandline -pxc)' 160complete $specification_opt -s v -l version -d"Specify version of gem to examine" -x 161complete $specification_opt -s l -l local -d"Restrict operations to the LOCAL domain (default)" 162complete $specification_opt -s r -l remote -d"Restrict operations to the REMOTE domain" 163complete $specification_opt -s b -l both -d"Allow LOCAL and REMOTE operations" 164complete $specification_opt -l all -d"Output specifications for all versions of the gem" 165 166## 167# uninstall 168set -l uninstall_opt -c gem -n'contains uninstall (commandline -pxc)' 169complete $uninstall_opt -s a -l all -d"Uninstall all matching versions" 170complete $uninstall_opt -l no-all -d"Don't uninstall all matching versions" 171complete $uninstall_opt -s i -l ignore-dependencies -d"Ignore dependency requirements while uninstalling" 172complete $uninstall_opt -l no-ignore-dependencies -d"Don't ignore dependency requirements while uninstalling" 173complete $uninstall_opt -s x -l executables -d"Uninstall applicable executables without confirmation" 174complete $uninstall_opt -l no-executables -d"Don't uninstall applicable executables without confirmation" 175complete $uninstall_opt -s v -l version -d"Specify version of gem to uninstall" -x 176 177## 178# unpack 179set -l unpack_opt -c gem -n'contains unpack (commandline -pxc)' 180complete $unpack_opt -s v -l version -d"Specify version of gem to unpack" -x 181 182## 183# update 184set -l update_opt -c gem -n'contains update (commandline -pxc)' 185complete $update_opt -s i -l install-dir -d"Gem repository directory to get installed gems" 186complete $update_opt -s N -l no-document -d"Disable documentation generation on update" 187complete $update_opt -l document -a'(__fish_append , rdoc ri)' -d"Specify the documentation types you wish to generate" 188complete $update_opt -s f -l force -d"Force gem to install, bypassing dependency checks" 189complete $update_opt -l no-force -d"Don't force gem to install, bypassing dependency checks" 190complete $update_opt -s t -l test -d"Run unit tests prior to installation" 191complete $update_opt -l no-test -d"Don't run unit tests prior to installation" 192complete $update_opt -s w -l wrappers -d"Use bin wrappers for executables" 193complete $update_opt -l no-wrappers -d"Don't use bin wrappers for executables" 194complete $update_opt -s P -l trust-policy -d"Specify gem trust policy" -x 195complete $update_opt -l ignore-dependencies -d"Do not install any required dependent gems" 196complete $update_opt -s y -l include-dependencies -d"Unconditionally install the required dependent gems" 197complete $update_opt -l system -d"Update the RubyGems system software"