The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Zilla::Plugin::GenShellCompletion - Generate shell completion scripts when distribution is installed

VERSION

This document describes version 0.11 of Dist::Zilla::Plugin::GenShellCompletion (from Perl distribution Dist-Zilla-Plugin-GenShellCompletion), released on 2016-04-20.

SYNOPSIS

In your dist.ini:

 [GenShellCompletion]

DESCRIPTION

This plugin modifies Makefile.PL so that when a user installs your distribution with make install, shcompgen is invoked to generate shell completion scripts for your scripts. This is convenient because immediately after the user installs your distribution, shell tab completion is already activated for your scripts.

shcompgen recognizes several ways/hints to generate completion to your scripts. Please see its documentation for more details.

Some notes:

First, user must already install and setup shcompgen prior to installing your distribution. But if shcompgen is installed after your distribution is installed, she can simply run shcompgen generate to scan PATH and generate completion for all recognized programs, including yours.

Second, this plugin's implementation strategy is currently as follow (probably hackish): insert some code in the generated Makefile.PL after WriteMakefile() to insert some targets in the Makefile generated by Makefile.PL.

Third, currently only MakeMaker is supported, Module::Build is not.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Dist-Zilla-Plugin-GenShellCompletion.

SOURCE

Source repository is at https://github.com/perlancar/perl-Dist-Zilla-Plugin-Rinci-InstallCompletion.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-GenShellCompletion

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

shcompgen

CLI scripts using the Perinci::CmdLine framework will automatically have shell tab completion capability. shcompgen detects this.

You can also use Getopt::Long::Complete or Getopt::Long::Subcommand. shcompgen also detects this.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.