#!perl

our $DATE = '2020-09-09'; # DATE
our $VERSION = '0.122'; # VERSION

# NO_PERINCI_CMDLINE_SCRIPT
# FRAGMENT id=shcompgen-hint completer=1 for=youtube-dl

use 5.010001;
use strict;
use warnings;
use Log::ger;

use CLI::Meta::YoutubeDl;
use Getopt::Long::Complete; # just so we can be detected as Getopt::Long script
use ShellCompleter::Util qw(run_shell_completer_for_getopt_long_app);

my $meta = $CLI::Meta::YoutubeDl::META;
my $opts = $meta->{opts};

binmode(STDOUT, ":encoding(utf8)");
run_shell_completer_for_getopt_long_app(
    map { $_ => (defined $opts->{$_} && defined $opts->{$_}{completion} ? $opts->{$_}{completion} : undef) } keys %$opts,
);

# ABSTRACT: Shell completer for youtube-dl
# PODNAME: _youtube-dl

__END__

=pod

=encoding UTF-8

=head1 NAME

_youtube-dl - Shell completer for youtube-dl

=head1 VERSION

This document describes version 0.122 of _youtube-dl (from Perl distribution App-ShellCompleter-YoutubeDl), released on 2020-09-09.

=head1 SYNOPSIS

To install, install the CPAN distribution this command comes in with, and then
in your bash (and/or bash startup file):

 complete -C _youtube-dl youtube-dl

or, you can use L<shcompgen> to do that for you automatically.

Now L<youtube-dl> has bash completion:

 % youtube-dl --no-pl<tab>
 % youtube-dl --external-downloader c<tab>

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-ShellCompleter-YoutubeDl>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-ShellCompleter-YoutubeDl>.

=head1 BUGS

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

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) 2020, 2019, 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.

=cut