Complete::Fish - Completion module for fish shell
This document describes version 0.060 of Complete::Fish (from Perl distribution Complete-Fish), released on 2020-01-29.
fish allows completion of option arguments to come from an external command, e.g.:
% complete -c deluser -l user -d Username -a "(cat /etc/passwd|cut -d : -f 1)"
The command is supposed to return completion entries one in a separate line. Description for each entry can be added, prefixed with a tab character. The provided function format_completion() accept a completion answer structure and format it for fish. Example:
format_completion()
format_completion(["a", "b", {word=>"c", description=>"Another letter"}])
will result in:
a b c Another letter
Usage:
format_completion($completion) -> str|array
Format completion for output (for shell).
fish accepts completion reply in the form of one entry per line to STDOUT. Description can be added to each entry, prefixed by tab character.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
$completion* => hash|array
Completion answer structure.
Either an array or hash, as described in Complete.
Complete
Return value: Formatted string (or array, if `as` key is set to `array`) (str|array)
Please visit the project's homepage at https://metacpan.org/release/Complete-Fish.
Source repository is at https://github.com/perlancar/perl-Complete-Fish.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Complete-Fish
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.
Complete::Bash
Fish manual.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020, 2016, 2015, 2014 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 Complete::Fish, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Complete::Fish
CPAN shell
perl -MCPAN -e shell install Complete::Fish
For more information on module installation, please visit the detailed CPAN module installation guide.