NAME App::shcompgen - Generate shell completion scripts VERSION This document describes version 0.07 of App::shcompgen (from Perl distribution App-shcompgen), released on 2014-12-17. FUNCTIONS generate(%args) -> [status, msg, result, meta] Generate shell completion scripts for detectable programs. Arguments ('*' denotes required arguments): * bash_global_dir => *array* (default: ["/usr/share/bash-completion/completions", "/etc/bash_completion.d"]) Directory to put completions scripts. * bash_per_user_dir => *array* Directory to put completions scripts. * global => *bool* Use global completions directory. Shell has global (system-wide) completions directory as well as per-user. For example, in fish the global directory is by default "/etc/fish/completions" and the per-user directory is "~/.config/fish/completions". By default, if running as root, the global is chosen. And if running as normal user, per-user directory is chosen. Using "--global" or "--per-user" overrides that and manually select which. * prog => *array* Program(s) to generate completion for. Can contain path (e.g. "../foo") or a plain word ("foo") in which case will be searched from PATH. * replace => *bool* Replace existing script. The default behavior is to skip if an existing completion script exists. * shell => *str* Override autodetection and select shell manually. The default is to look at your SHELL environment variable value. If it is undefined, the default is "bash". Return value: 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. (any) init(%args) -> [status, msg, result, meta] Initialize shcompgen. This subcommand creates the completion directories and initialization shell script, as well as run "generate". Arguments ('*' denotes required arguments): * bash_global_dir => *array* (default: ["/usr/share/bash-completion/completions", "/etc/bash_completion.d"]) Directory to put completions scripts. * bash_per_user_dir => *array* Directory to put completions scripts. * global => *bool* Use global completions directory. Shell has global (system-wide) completions directory as well as per-user. For example, in fish the global directory is by default "/etc/fish/completions" and the per-user directory is "~/.config/fish/completions". By default, if running as root, the global is chosen. And if running as normal user, per-user directory is chosen. Using "--global" or "--per-user" overrides that and manually select which. * shell => *str* Override autodetection and select shell manually. The default is to look at your SHELL environment variable value. If it is undefined, the default is "bash". Return value: 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. (any) list(%args) -> [status, msg, result, meta] List all shell completion scripts generated by this script. Arguments ('*' denotes required arguments): * bash_global_dir => *array* (default: ["/usr/share/bash-completion/completions", "/etc/bash_completion.d"]) Directory to put completions scripts. * bash_per_user_dir => *array* Directory to put completions scripts. * detail => *bool* * global => *bool* Use global completions directory. Shell has global (system-wide) completions directory as well as per-user. For example, in fish the global directory is by default "/etc/fish/completions" and the per-user directory is "~/.config/fish/completions". By default, if running as root, the global is chosen. And if running as normal user, per-user directory is chosen. Using "--global" or "--per-user" overrides that and manually select which. * shell => *str* Override autodetection and select shell manually. The default is to look at your SHELL environment variable value. If it is undefined, the default is "bash". Return value: 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. (any) remove(%args) -> [status, msg, result, meta] Remove shell completion scripts generated by this script. Arguments ('*' denotes required arguments): * bash_global_dir => *array* (default: ["/usr/share/bash-completion/completions", "/etc/bash_completion.d"]) Directory to put completions scripts. * bash_per_user_dir => *array* Directory to put completions scripts. * global => *bool* Use global completions directory. Shell has global (system-wide) completions directory as well as per-user. For example, in fish the global directory is by default "/etc/fish/completions" and the per-user directory is "~/.config/fish/completions". By default, if running as root, the global is chosen. And if running as normal user, per-user directory is chosen. Using "--global" or "--per-user" overrides that and manually select which. * prog => *array* Program(s) to remove completion script of. Can contain path (e.g. "../foo") or a plain word ("foo") in which case will be searched from PATH. * shell => *str* Override autodetection and select shell manually. The default is to look at your SHELL environment variable value. If it is undefined, the default is "bash". Return value: 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. (any) HOMEPAGE Please visit the project's homepage at . SOURCE Source repository is at . BUGS Please report any bugs or feature requests on the bugtracker website 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. AUTHOR perlancar COPYRIGHT AND LICENSE This software is copyright (c) 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.