]> git.rmz.io Git - dotfiles.git/blob - zsh/plugins/cpanm/_cpanm
add my own theme
[dotfiles.git] / zsh / plugins / cpanm / _cpanm
1 #compdef cpanm
2
3 ##
4 # cpanminus Z Shell completion script
5 ##
6 #
7 # Current supported cpanm version: 1.4000 (Tue Mar 8 01:00:49 PST 2011)
8 #
9 # The latest code is always located at:
10 # https://github.com/rshhh/cpanminus/blob/master/etc/_cpanm
11 #
12
13 local arguments curcontext="$curcontext"
14 typeset -A opt_args
15
16
17 arguments=(
18
19 # Commands
20 # '(--install -i)'{--install,-i}'[Installs the modules]'
21 '(- :)--self-upgrade[Upgrades itself]'
22 '(- :)--info[Displays distribution info on CPAN]'
23 '(--installdeps)--installdeps[Only install dependencies]'
24 '(--look)--look[Download/unpack the distribution and then open the directory with your shell]'
25 '(- :)'{--help,-h}'[Displays help information]'
26 '(- :)'{--version,-V}'[Displays software version]'
27
28 # Options
29 {--force,-f}'[Force install]'
30 {--notest,-n}'[Do not run unit tests]'
31 {--sudo,-S}'[sudo to run install commands]'
32 '(-v --verbose --quiet -q)'{--verbose,-v}'[Turns on chatty output]'
33 '(-q --quiet --verbose -v)'{--quiet,-q}'[Turns off all output]'
34 {--local-lib,-l}'[Specify the install base to install modules]'
35 {--local-lib-contained,-L}'[Specify the install base to install all non-core modules]'
36 '--mirror[Specify the base URL for the mirror (e.g. http://cpan.cpantesters.org/)]:URLs:_urls'
37 '--mirror-only[Use the mirror\''s index file instead of the CPAN Meta DB]'
38 '--prompt[Prompt when configure/build/test fails]'
39 '--reinstall[Reinstall the distribution even if you already have the latest version installed]'
40 '--interactive[Turn on interactive configure]'
41
42 '--scandeps[Scan the depencencies of given modules and output the tree in a text format]'
43 '--format[Specify what format to display the scanned dependency tree]:scandeps format:(tree json yaml dists)'
44
45 '--save-dists[Specify the optional directory path to copy downloaded tarballs]'
46 # '--uninst-shadows[Uninstalls the shadow files of the distribution that you\''re installing]'
47
48 '--auto-cleanup[Number of days that cpanm\''s work directories expire in. Defaults to 7]'
49 '(--no-man-pages)--man-pages[Generates man pages for executables (man1) and libraries (man3)]'
50 '(--man-pages)--no-man-pages[Do not generate man pages]'
51
52
53 # Note: Normally with "--lwp", "--wget" and "--curl" options set to true (which is the default) cpanm tries LWP,
54 # Wget, cURL and HTTP::Tiny (in that order) and uses the first one available.
55 # (So that the exclusions are not enabled here for the completion)
56 '(--lwp)--lwp[Use LWP module to download stuff]'
57 '(--wget)--wget[Use GNU Wget (if available) to download stuff]'
58 '(--curl)--curl[Use cURL (if available) to download stuff]'
59
60 # Other completions
61 '*:Local directory or archive:_files -/ -g "*.(tar.gz|tgz|tar.bz2|zip)(-.)"'
62 # '*::args: _normal' # this looks for default files (any files)
63 )
64 _arguments -s $arguments \
65 && return 0
66
67 return 1