Created
September 8, 2009 11:11
-
-
Save spiritloose/182862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef cpan | |
# | |
# zsh completion code for cpan | |
# Jiro Nishiguchi <[email protected]> | |
# | |
typeset -A opt_args | |
local expl context state line | |
local -a meta_opts | |
meta_opts="-a -A -C -D -L -h -O -r -v" | |
_arguments -C -s -S \ | |
'(1 * -)-a[Creates the CPAN.pm autobundle with CPAN::Shell->autobundle.]' \ | |
'(1 * -)-A[Shows the primary maintainers for the specified modules]' \ | |
'(1 * -)-C[Show the "Changes" files for the specified modules]' \ | |
'(1 * -)-D[Show the module details.]' \ | |
'(1 * -)-L[List the modules by the specified authors.]' \ | |
'(1 * -)-h[Prints a help message.]' \ | |
'(1 * -)-O[Show the out-of-date modules.]' \ | |
'(1 * -)-r[Recompiles dynamically loaded modules with CPAN::Shell->recompile.]' \ | |
'(1 * -)-v[Print the script version and CPAN.pm version.]' \ | |
"($meta_opts -i -m -t)-c[Runs a \`make clean\` in the specified module's directories.]" \ | |
"($meta_opts)-f[Forces the specified action, when it normally would have failed.]" \ | |
"($meta_opts -c -m -t)-i[Installed the specified modules.]" \ | |
"($meta_opts -c -i -t)-m[Makes the specified modules.]" \ | |
"($meta_opts -c -i -m)-t[Runs a \`make test\` on the specified modules.]" \ | |
"*:args" \ | |
&& return 0 | |
return 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment