App-ShellCompleter-YtDlp
view release on metacpan or search on metacpan
script/_yt-dlp view on Meta::CPAN
#!perl
# NO_PERINCI_CMDLINE_SCRIPT
# FRAGMENT id=shcompgen-hint completer=1 for=yt-dlp
use 5.010001;
use strict;
use warnings;
use Log::ger;
use CLI::Meta::YtDlp;
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);
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-09-07'; # DATE
our $DIST = 'App-ShellCompleter-YtDlp'; # DIST
our $VERSION = '0.001'; # VERSION
my $meta = $CLI::Meta::YtDlp::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 yt-dlp
# PODNAME: _yt-dlp
__END__
=pod
=encoding UTF-8
=head1 NAME
_yt-dlp - Shell completer for yt-dlp
=head1 VERSION
This document describes version 0.001 of _yt-dlp (from Perl distribution App-ShellCompleter-YtDlp), released on 2021-09-07.
=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 _yt-dlp yt-dlp
or, you can use L<shcompgen> to do that for you automatically.
Now L<yt-dlp> has bash completion:
% yt-dlp --no-pl<tab>
% yt-dlp --external-downloader c<tab>
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-ShellCompleter-YtDlp>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-ShellCompleter-YtDlp>.
=head1 SEE ALSO
L<_youtube-dl> script from L<App::ShellCompleter::YoutubeDl>
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 CONTRIBUTING
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:
( run in 0.650 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )