From 4331face4af7933a833448b8dc5e8bc700a11381 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Fri, 4 Sep 2020 21:39:17 -0500 Subject: [PATCH] [vips] Add vips completions Just a skeleton completion file, but the list of available actions/completions is at least dynamically generated (there's a lot of them, they are impossible to remember, and they depend on build options). [ci skip] --- share/completions/vips.fish | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 share/completions/vips.fish diff --git a/share/completions/vips.fish b/share/completions/vips.fish new file mode 100644 index 000000000..a23a4bf68 --- /dev/null +++ b/share/completions/vips.fish @@ -0,0 +1,25 @@ +# Regular completions +complete -c vips -s l -l list -d 'List objects' +complete -c vips -s p -l plugin -d 'Load PLUGIN' +complete -c vips -s v -l version -d 'Print version' +complete -c vips -l vips-concurrency -d 'Evaluate with N threads' +complete -c vips -l vips-progress -d 'Show progress feedback' +complete -c vips -l vips-leak -d 'Leak-check on exit' +complete -c vips -l vips-profile -d 'Profile and dump timing on exit' +complete -c vips -l vips-disc-threshold -d 'Decompress images larger than N' +complete -c vips -l vips-novector -d 'Disable vectorised operations' +complete -c vips -l vips-cache-max -d 'Cache at most N operations' +complete -c vips -l vips-cache-max-memory -d 'Cache at most N bytes in memory' +complete -c vips -l vips-cache-max-files -d 'Allow at most N open files' +complete -c vips -l vips-cache-trace -d 'Trace operation cache' +complete -c vips -l vips-cache-dump -d 'Dump operation cache on exit' +complete -c vips -l vips-version -d 'Print libvips version' +complete -c vips -l vips-config -d 'Print libvips config' +complete -c vips -l vips-pipe-read-limit -d 'Pipe read limit (bytes)' + +# Operations +complete -c vips -n '__fish_is_first_token' -xa "(__fish_vips_ops)" + +function __fish_vips_ops + vips -l | string match -rv _base | string replace -rf '^\s*\S+ \((.+?)\), +(\S.*?)(?:\s*[,(].*)?$' '$1\t$2' +end