NAME

Complete::Host - Completion routines related to hostnames

VERSION

This document describes version 0.05 of Complete::Host (from Perl distribution Complete-Host), released on 2017-07-03.

FUNCTIONS

complete_known_host

Usage:

complete_known_host(%args) -> array

Complete a known hostname.

Complete from a list of "known" hostnames, which are hostnames that are listed in some configurations or those that have previously been entered into the system.

Known hosts will be searched from: /etc/hosts, SSH known hosts files, and remotes in .git configuration files.

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

  • include_hosts => bool (default: 1)

    Whether to include hosts in /etc/hosts.

  • include_ip => bool

    Whether to include IP addresses.

  • include_ssh_known_hosts => bool (default: 1)

    Whether to include hosts in ssh known_hosts files.

    Only unhashed hosts will be included.

  • word* => str (default: "")

    Word to complete.

Return value: (array)

ENVIRONMENT

COMPLETE_HOST_TRACE => bool

If set to true, will display more log statements for debugging.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Complete-Host.

SOURCE

Source repository is at https://github.com/perlancar/perl-Complete-Host.

BUGS

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

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

Complete

Other Complete::* modules.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017, 2016, 2015 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.