Perinci::Sub::To::FishComplete - From Rinci function metadata, generate tab completion commands for the fish shell
This document describes version 0.03 of Perinci::Sub::To::FishComplete (from Perl distribution Perinci-Sub-To-FishComplete), released on 2015-09-04.
use Perinci::Sub::To::FishComplete qw(gen_fish_complete_from_meta); my $res = gen_fish_complete_from_meta(meta => $meta); die "Failed: $res->[0] - $res->[1]" unless $res->[0] == 200; say $res->[2];
This module is used by Perinci::CmdLine.
Complete::Fish::Gen::FromGetoptLong.
From Rinci function metadata, generate tab completion commands for the fish shell.
Arguments ('*' denotes required arguments):
cmdname => str
Command name.
common_opts => hash
Will be passed to gen_getopt_long_spec_from_meta().
gcd_res => array
Full result from gen_cli_doc_data_from_meta().
If you already call Perinci::Sub::To::CLIDocData's gen_cli_opt_spec_from_meta(), you can pass the full enveloped result here, to avoid calculating twice.
Perinci::Sub::To::CLIDocData
gen_cli_opt_spec_from_meta()
lang => str
meta* => hash
meta_is_normalized => bool
per_arg_json => bool
Pass per_arg_json=1 to Perinci::Sub::GetArgs::Argv.
per_arg_yaml => bool
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: A script that can be fed to the fish shell (str)
Please visit the project's homepage at https://metacpan.org/release/Perinci-Sub-To-FishComplete.
Source repository is at https://github.com/perlancar/perl-Perinci-Sub-To-FishComplete.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Sub-To-FishComplete
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.
perlancar <perlancar@cpan.org>
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.
To install Perinci::Sub::To::FishComplete, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perinci::Sub::To::FishComplete
CPAN shell
perl -MCPAN -e shell install Perinci::Sub::To::FishComplete
For more information on module installation, please visit the detailed CPAN module installation guide.