zsh-completions/src/_cpanm

106 lines
5.1 KiB
Plaintext
Raw Normal View History

2011-07-21 23:00:09 +00:00
#compdef cpanm
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for cpanm (http://search.cpan.org/dist/App-cpanminus/lib/App/cpanminus.pm).
#
# Source: https://github.com/rshhh/cpanminus/blob/master/etc/_cpanm
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Ryushi (https://github.com/rshhh)
#
# ------------------------------------------------------------------------------
local arguments curcontext="$curcontext"
typeset -A opt_args
arguments=(
# Commands
# '(--install -i)'{--install,-i}'[Installs the modules]'
'(- :)--self-upgrade[Upgrades itself]'
'(- :)--info[Displays distribution info on CPAN]'
'(--installdeps)--installdeps[Only install dependencies]'
'(--look)--look[Download/unpack the distribution and then open the directory with your shell]'
2013-09-05 03:42:09 +00:00
'(--uninstall -U)'{--uninstall,-U}'[Uninstalls the modules]'
2011-07-21 23:00:09 +00:00
'(- :)'{--help,-h}'[Displays help information]'
'(- :)'{--version,-V}'[Displays software version]'
# Options
{--force,-f}'[Force install]'
{--notest,-n}'[Do not run unit tests]'
2013-09-05 03:42:09 +00:00
'(--test-only)--test-only[Run the test only and do not install the module]'
2011-07-21 23:00:09 +00:00
{--sudo,-S}'[sudo to run install commands]'
'(-v --verbose --quiet -q)'{--verbose,-v}'[Turns on chatty output]'
'(-q --quiet --verbose -v)'{--quiet,-q}'[Turns off all output]'
{--local-lib,-l}'[Specify the install base to install modules]'
{--local-lib-contained,-L}'[Specify the install base to install all non-core modules]'
2013-09-05 03:42:09 +00:00
'(--self-contained)--self-contained[Assume no non-core modules are installed on the system]'
2011-07-21 23:00:09 +00:00
'--mirror[Specify the base URL for the mirror (e.g. http://cpan.cpantesters.org/)]:URLs:_urls'
'--mirror-only[Use the mirror\''s index file instead of the CPAN Meta DB]'
2013-09-05 03:42:09 +00:00
'--mirror-index[Specifies the file path for module search index]:FILES:_files'
2011-07-21 23:00:09 +00:00
'--prompt[Prompt when configure/build/test fails]'
2013-09-05 03:42:09 +00:00
'(--dev)--dev[Search for a newer developer release as well]'
2011-07-21 23:00:09 +00:00
'--reinstall[Reinstall the distribution even if you already have the latest version installed]'
'--interactive[Turn on interactive configure]'
2013-09-05 03:42:09 +00:00
'(--pp --pureperl)'{--pp,--pureperl}'[Prefer Pure perl build of modules]'
'(--with-recommends)--with-recommends[Installs dependencies declared as "recommends"]'
'(--with-suggests)--with-suggests[Installs dependencies declared as "suggests"]'
'(--with-feature)--with-feature[Specifies the feature to enable]'
'(--without-feature)--without-feature[Specifies the feature to disable]'
'(--with-all-features)--with-all-features[Enables all the optional features]'
'(--configure-timeout)--configure-timeout[Specify the timeout length to wait for configure]'
'(--build-timeout)--build-timeout[Specify the timeout length to wait for build]'
'(--test-timeout)--test-timeout[Specify the timeout length to wait for test]'
'(--configure-args)--configure-args[Pass arguments for configure commands]'
'(--build-args)--build-args[Pass arguments for build commands]'
'(--test-args)--test-args[Pass arguments for test commands]'
'(--install-args)--install-args[Pass arguments for install commands]'
2011-07-21 23:00:09 +00:00
2015-06-08 07:05:14 +00:00
'--scandeps[Scan the dependencies of given modules and output the tree in a text format]'
2011-07-21 23:00:09 +00:00
'--format[Specify what format to display the scanned dependency tree]:scandeps format:(tree json yaml dists)'
'--save-dists[Specify the optional directory path to copy downloaded tarballs]'
2013-09-05 03:42:09 +00:00
'(--uninst-shadows)--uninst-shadows[Uninstalls the shadow files of the distribution that you\''re installing]'
2011-07-21 23:00:09 +00:00
2013-09-05 03:42:09 +00:00
'(--cascade-search)--cascade-search[Specifies whether to cascade search]'
2015-06-08 07:05:14 +00:00
'(--skip-installed)--skip-installed[Specifies modules which latest version are already installed]'
2013-09-05 03:42:09 +00:00
'(--skip-satisfied)--skip-satisfied[Specifies module and version for skipping installation]'
'(--verify)--verify[Verify the integrity of distribution files]'
'(--no-report-perl-version)--report-perl-version[Report locally installed perl version as part of User-Agent]'
'(--report-perl-version)--no-report-perl-version[Disable --report-perl-version]'
2011-07-21 23:00:09 +00:00
'--auto-cleanup[Number of days that cpanm\''s work directories expire in. Defaults to 7]'
'(--no-man-pages)--man-pages[Generates man pages for executables (man1) and libraries (man3)]'
'(--man-pages)--no-man-pages[Do not generate man pages]'
# Note: Normally with "--lwp", "--wget" and "--curl" options set to true (which is the default) cpanm tries LWP,
# Wget, cURL and HTTP::Tiny (in that order) and uses the first one available.
# (So that the exclusions are not enabled here for the completion)
'(--lwp)--lwp[Use LWP module to download stuff]'
'(--wget)--wget[Use GNU Wget (if available) to download stuff]'
'(--curl)--curl[Use cURL (if available) to download stuff]'
# Other completions
'*:Local directory or archive:_files -/ -g "*.(tar.gz|tgz|tar.bz2|zip)(-.)"'
# '*::args: _normal' # this looks for default files (any files)
)
_arguments -s $arguments \
&& return 0
return 1
# 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