Dist::Zilla::Plugin::GenShellCompletion - Generate shell completion scripts when distribution is installed
This document describes version 0.11 of Dist::Zilla::Plugin::GenShellCompletion (from Perl distribution Dist-Zilla-Plugin-GenShellCompletion), released on 2016-04-20.
In your dist.ini:
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.
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
WriteMakefile() to insert some targets in the
Makefile generated by
Third, currently only MakeMaker is supported, Module::Build is not.
Please visit the project's homepage at https://metacpan.org/release/Dist-Zilla-Plugin-GenShellCompletion.
Source repository is at https://github.com/perlancar/perl-Dist-Zilla-Plugin-Rinci-InstallCompletion.
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.
CLI scripts using the Perinci::CmdLine framework will automatically have shell tab completion capability.
shcompgen detects this.
This software is copyright (c) 2016 by firstname.lastname@example.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.