Complete::Man - Complete from list of available manpages
This document describes version 0.100 of Complete::Man (from Perl distribution Complete-Man), released on 2023-01-17.
use Complete::Man qw(complete_manpage complete_manpage_section); my $res = complete_manpage(word => 'gre'); # -> ['grep', 'grep-changelog', 'greynetic', 'greytiff'] # only from certain section $res = complete_manpage(word => 'gre', section => 1); # -> ['grep', 'grep-changelog', 'greytiff'] # complete section $res = complete_manpage_section(word => '3'); # -> ['3', '3perl', '3pm', '3readline']
Usage:
complete_manpage(%args) -> any
Complete from list of available manpages.
For each directory in MANPATH environment variable, search man section directories and man files.
MANPATH
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
section => str
Only search from specified section(s).
Can also be a comma-separated list to allow multiple sections.
use_mandb => bool (default: 1)
(No description)
word* => str
Return value: (any)
complete_manpage_section(%args) -> any
Complete from list of available manpage sections.
If MANSECT is defined, will use that.
MANSECT
Otherwise, will collect section names by going through each directory in MANPATH environment variable, searching man section directories and man files.
Please visit the project's homepage at https://metacpan.org/release/Complete-Man.
Source repository is at https://github.com/perlancar/perl-Complete-Man.
perlancar <perlancar@cpan.org>
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
This software is copyright (c) 2023, 2017, 2016, 2015, 2014 by perlancar <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.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Complete-Man
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.
To install Complete::Man, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Complete::Man
CPAN shell
perl -MCPAN -e shell install Complete::Man
For more information on module installation, please visit the detailed CPAN module installation guide.