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

# Note: This script is a CLI interface to Riap function /Perinci/Examples/test_completion
# and generated automatically using Dist::Zilla::Plugin::Rinci::ScriptFromFunc version 0.08

our $DATE = '2015-02-06'; # DATE
our $VERSION = '0.06'; # VERSION

use 5.010001;
use strict;
use warnings;

use Perinci::Examples;

use Perinci::CmdLine::Classic;

Perinci::CmdLine::Classic->new(
    url => "/Perinci/Examples/test_completion",
)->run;

# ABSTRACT: Do nothing, return args
# PODNAME: peri-eg-test-completion

__END__

=pod

=encoding UTF-8

=head1 NAME

peri-eg-test-completion - Do nothing, return args

=head1 VERSION

This document describes version 0.06 of peri-eg-test-completion (from Perl distribution Perinci-Examples-Bin-Classic), released on 2015-02-06.

=head1 SYNOPSIS

Usage:

 % peri-eg-test-completion [options] [i1] [a1] ...

=head1 DESCRIPTION

This function is used to test argument completion.

=head1 OPTIONS

C<*> marks required options.

=over

=item B<--a1-json>=I<s>

{en_US Array of strings, where the string has "in" schema clause} (JSON-encoded).

See C<--a1>.

=item B<--a1-yaml>=I<s>

{en_US Array of strings, where the string has "in" schema clause} (YAML-encoded).

See C<--a1>.

=item B<--a1>=I<s@>

{en_US Array of strings, where the string has "in" schema clause}.

{en_US 
Completion library can perhaps complete from the `in` value and remember
completed items when command-line option is repeated, e.g. in:

    --a1 <tab>

it will complete from any `in` value, but in:

    --a1 apple --a1 <tab>

it can exclude `apple` from the completion candidate.

Currently the completion library `Perinci::Sub::Complete` does not do this
though. Perhaps there can be an option to toggle this behavior.
}


Can be specified multiple times.

=item B<--a2-json>=I<s>

{en_US Array with element_completion routine that generate random letter} (JSON-encoded).

See C<--a2>.

=item B<--a2-yaml>=I<s>

{en_US Array with element_completion routine that generate random letter} (YAML-encoded).

See C<--a2>.

=item B<--a2>=I<s@>

{en_US Array with element_completion routine that generate random letter}.

Can be specified multiple times.

=item B<--a3-json>=I<s>

{en_US Array with element_completion routine that dies} (JSON-encoded).

See C<--a3>.

=item B<--a3-yaml>=I<s>

{en_US Array with element_completion routine that dies} (YAML-encoded).

See C<--a3>.

=item B<--a3>=I<s@>

{en_US Array with element_completion routine that dies}.

{en_US 
See also `s3`.
}


Can be specified multiple times.

=item B<--arg0-json>=I<s>

{en_US Argument without any schema} (JSON-encoded).

See C<--arg0>.

=item B<--arg0-yaml>=I<s>

{en_US Argument without any schema} (YAML-encoded).

See C<--arg0>.

=item B<--arg0>=I<s>

{en_US Argument without any schema}.

{en_US }

=item B<--config-path>=I<s>

{en_US Set path to configuration file}.

Can be specified multiple times.

=item B<--config-profile>=I<s>

{en_US Set configuration profile to use}.

=item B<--f0>=I<f>

{en_US Float with just "float" schema defined}.

=item B<--f1>=I<f>

{en_US Float with xmin/xmax on the schema}.

{en_US 
A completion library can attempt to provide some possible and incremental
completion (e.g. if word is currently at one decimal digit like 1.2, it can
provide completion of 1.20 .. 1.29).
}


=item B<--format-options>=I<s>

{en_US Pass options to formatter}.

=item B<--format>=I<s>

{en_US Choose output format, e.g. json, text}.

=item B<--help>, B<-h>, B<-?>

{en_US Display this help message}.

=item B<--i0>=I<i>

{en_US Integer with just "int" schema defined}.

{en_US }

=item B<--i1>=I<i>

{en_US Integer with min/xmax on the schema}.

{en_US 
A completion library (like `Perinci::Sub::Complete`) can generate a list of
completion from the low end to the high end of the range, as long as it is not
too long.
}


=item B<--i2>=I<i>

{en_US Integer with large range min/max on the schema}.

{en_US 
Unlike in `i1`, a completion library probably won't generate a number sequence
for this argument because they are considered too long (1000+ items).
}


=item B<--json>

{en_US Equivalent to --format=json-pretty}.

=item B<--no-config>

{en_US Do not use any configuration file}.

=item B<--s1>=I<s>

{en_US String with possible values in "in" schema clause}.

Valid values:

 ["apple", "apricot", "banana", "grape", "grapefruit", "red date", "red grape", "green grape"]

=item B<--s1b>=I<s>

{en_US String with possible values in "in" schema clause, contains special characters}.

Valid values:

 ["space: ", "word containing spaces", "single-quote: '", "double-quote: \"", "slash/", "back\\slash", "tab\t", "word:with:colon", "dollar \$sign", "various parenthesis: [ ] { } ( )", "tilde ~", "backtick `", "caret^", "at\@", "pound#", "percent%", "ampersand&", "question?", "wildcard*", "comma,", "semicolon;", "pipe|", "redirection > <", "plus+"]

{en_US 
This argument is intended to test how special characters are escaped.
}


=item B<--s2>=I<s>

{en_US String with completion routine that generate random letter}.

=item B<--s3>=I<s>

{en_US String with completion routine that dies}.

{en_US 
Completion should not display error (except perhaps under debugging). It should
just provide no completion.
}


=item B<--version>, B<-v>

=back

=head1 FILES

~/.conf

/etc/.conf

=head1 COMPLETION

This script has shell tab completion capability with support for several shells.

=head2 bash

To activate bash completion for this script, put:

 complete -C peri-eg-test-completion peri-eg-test-completion

in your bash startup (e.g. C<~/.bashrc>). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

It is recommended, however, that you install L<shcompgen> which allows you to activate completion scripts for several kinds of scripts on multiple shells. Some CPAN distributions (those that are built with L<Dist::Zilla::Plugin::GenShellCompletion>) will even automatically enable shell completion for their included scripts (using C<shcompgen>) at installation time, so you can immadiately have tab completion.

=head2 tcsh

To activate tcsh completion for this script, put:

 complete peri-eg-test-completion 'p/*/`peri-eg-test-completion`/'

in your tcsh startup (e.g. C<~/.tcshrc>). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

It is also recommended to install C<shcompgen> (see above).

=head2 other shells

For fish and zsh, install C<shcompgen> as described above.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Perinci-Examples-Bin-Classic>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Perinci-Examples-Bin>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Examples-Bin-Classic>

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.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

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

=cut