// ZSH-CPAN-COMPLETION — LIVE METACPAN COMPLETION FOR cpan / cpanm

zsh plugin · live perl -MCPAN -e 'CPAN::Shell->m(...)' module completion · intelligent cache · tarball completion

GitHub Issues
// Color scheme

>_ZSH-CPAN-COMPLETION

Perl modules, completed from CPAN. Live remote CPAN package completion via perl -MCPAN -e 'CPAN::Shell->m("...")'. Full cpan / cpanm flag completion, intelligent cache, tarball completion (.tar.gz, .tgz, .tar.bz2, .zip), prefix-length guard to keep the shell responsive.

Install

# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-cpan-completion

# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-cpan-completion \
    "$HOME/.oh-my-zsh/custom/plugins/zsh-cpan-completion"
# then: plugins+=(zsh-cpan-completion)

# Manual
git clone https://github.com/MenkeTechnologies/zsh-cpan-completion
source zsh-cpan-completion/zsh-cpan-completion.plugin.zsh

Configuration

ZPWR_CPAN_MIN_PREFIXdefault 2 — minimum prefix length before querying remote CPAN. Lower = more data, higher latency / crash risk.

Examples

cpan install Mo<TAB>        # live remote completion: Moose, Mojo::*, Module::*
cpanm install DBI<TAB>      # same path via cpanm
cpan -j /path/to/config.pm  # full flag completion
cpan install ./Some-1.0.tar.gz  # tarball file completion

Sibling plugins

Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella: