<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    SHARYANTO::Complete::Util - Shell tab completion routines

VERSION
    This document describes version 0.04 of SHARYANTO::Complete::Util (from
    Perl distribution SHARYANTO-Complete-Util), released on 2014-06-24.

FUNCTIONS
  complete_array(%args) -&gt; any
    Arguments ('*' denotes required arguments):

    *   array* =&gt; *array*

    *   ci =&gt; *bool* (default: 0)

    *   word =&gt; *str* (default: "")

    Return value:

  complete_env(%args) -&gt; any
    Arguments ('*' denotes required arguments):

    *   ci =&gt; *bool* (default: 0)

    *   word =&gt; *str* (default: "")

    Return value:

  complete_file(%args) -&gt; any
    Arguments ('*' denotes required arguments):

    *   d =&gt; *bool* (default: 1)

        Whether to include directory.

    *   f =&gt; *bool* (default: 1)

        Whether to include file.

    *   word =&gt; *str* (default: "")

    Return value:

  complete_hash_key(%args) -&gt; any
    Arguments ('*' denotes required arguments):

    *   ci =&gt; *bool* (default: 0)

    *   hash* =&gt; *hash*

    *   word =&gt; *str* (default: "")

    Return value:

  complete_program(%args) -&gt; any
    Arguments ('*' denotes required arguments):

    *   word =&gt; *str* (default: "")

    Return value:

  mimic_shell_dir_completion(%args) -&gt; any
    Make completion of paths behave more like shell.

    This function employs a trick to make directory/path completion work
    more like shell's own. In shell, when completing directory, the sole
    completion for "foo/" is "foo/", the cursor doesn't automatically add a
    space (like the way it does when there is only a single completion
    possible). Instead it stays right after the "/" to allow user to
    continue completing further deeper in the tree ("foo/bar" and so on).

    To make programmable completion work like shell's builtin dir
    completion, the trick is to add another completion alternative "foo/"
    (with an added space) so shell won't automatically add a space because
    there are now more than one completion possible ("foo/" and "foo/").

    Arguments ('*' denotes required arguments):

    *   completion* =&gt; *str*

    Return value:

  parse_shell_cmdline(@args) -&gt; any
    Parse shell command-line for processing by completion routines.

    Currently only supports bash.

    Returns hash with the following keys: "words" (array of str, equivalent
    to "COMP_WORDS" provided by shell to completion routine), "cword" (int,
    equivalent to shell-provided "COMP_CWORD").

    Arguments ('*' denotes required arguments):

    *   cmdline =&gt; *str*

        Command-line, defaults to COMP_LINE environment.

    *   opts =&gt; *hash*

        Currently known options: parse*line*sub (code).

    *   point =&gt; *int*

        Point/position to complete in command-line, defaults to COMP_POINT.

    Return value:

SEE ALSO
    SHARYANTO

HOMEPAGE
    Please visit the project's homepage at
    &lt;https://metacpan.org/release/SHARYANTO-Complete-Util&gt;.

SOURCE
    Source repository is at
    &lt;https://github.com/sharyanto/perl-SHARYANTO-Complete-Util&gt;.

BUGS
    Please report any bugs or feature requests on the bugtracker website
    &lt;https://rt.cpan.org/Public/Dist/Display.html?Name=SHARYANTO-Complete-Ut
    il&gt;

    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.

AUTHOR
    Steven Haryanto &lt;stevenharyanto@gmail.com&gt;

COPYRIGHT AND LICENSE
    This software is copyright (c) 2014 by Steven Haryanto.

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

</pre></body></html>