fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian Boehmcompletions: More shortening5dc07c9e7

master
4.6 KiB142 linesraw
1# Current as of cwebp 1.0.3.
2
3set -l preset_opts '
4    default\t
5    photo\t
6    picture\t
7    drawing\t
8    icon\t
9    text\t
10'
11
12set -l z_opts '
13    0\tfastest
14    1\t
15    2\t
16    3\t
17    4\t
18    5\t
19    6\t
20    7\t
21    8\t
22    9\tslowest
23'
24
25set -l m_opts '
26    0\tfastest
27    1\t
28    2\t
29    3\t
30    4\tdefault
31    5\t
32    6\tslowest
33'
34
35set -l segments_opts '
36    1\t
37    2\t
38    3\t
39    4\tdefault
40'
41
42set -l sharpness_opts '
43    0\tmost sharp; default
44    1\t
45    2\t
46    3\t
47    4\t
48    5\t
49    6\t
50    7\tleast sharp
51'
52
53set -l alpha_method_opts '
54    0\t
55    1\tdefault
56'
57
58set -l alpha_filter_opts '
59    none\t
60    fast\tdefault
61    best\t
62'
63
64set -l metadata_opts '
65    all\t
66    none\tdefault
67    exif\t
68    icc\t
69    xmp\t
70'
71
72function __fish_cwebp_is_first_arg_or_its_value -a arg -d 'Like __fish_is_first_arg, but also returns true for the second token after a given parameter'
73    set -l tokens (commandline -cx)
74
75    switch (count $tokens)
76        case 1
77            return 0
78        case 2
79            if test "$tokens[2]" = "$arg"
80                return 0
81            end
82            return 1
83        case '*'
84            return 1
85    end
86end
87
88complete -c cwebp -f -o h -o help -d 'Help (short)'
89complete -c cwebp -f -o H -o longhelp -l help -d 'Help (long)'
90
91complete -c cwebp -x -o q -d 'Quality (float; 0…100; default: 75)'
92complete -c cwebp -x -o alpha_q -d 'Transparency-compression quality (integer 0…100; default: 100)'
93
94complete -c cwebp -x -n '__fish_cwebp_is_first_arg_or_its_value -preset' -o preset -a $preset_opts -d 'Preset setting'
95
96complete -c cwebp -x -o z -a "$z_opts" -d 'Lossless preset of level'
97complete -c cwebp -x -o m -a "$m_opts" -d 'Compression method'
98complete -c cwebp -x -o segments -a "$segments_opts" -d 'Number of segments to use'
99complete -c cwebp -x -o size -d 'Target size (in bytes)'
100complete -c cwebp -x -o psnr -d 'Target PSNR (in dB; typically: 42)'
101
102complete -c cwebp -x -o s -d 'Input size (width x height) for YUV'
103complete -c cwebp -x -o sns -d 'Spatial noise shaping (integer 0…100; default: 50)'
104complete -c cwebp -x -o f -d 'Filter strength (integer 0…100; default: 60)'
105complete -c cwebp -x -o sharpness -a "$sharpness_opts" -d 'Filter sharpness'
106complete -c cwebp -o strong -d 'Use strong filter'
107complete -c cwebp -o simple -d 'Use simple filter'
108complete -c cwebp -o sharp_yuv -d 'Use sharper (and slower) RGB->YUV conversion'
109complete -c cwebp -x -o partition_limit -d 'Limit quality to fit 512k limit on first partition (0:no degradation…100:full degradation)'
110complete -c cwebp -x -o pass -a '(seq 0 10)' -d 'Analysis pass number'
111complete -c cwebp -x -o crop -d 'Crop picture with <x> <y> <v> <h> rectangle'
112complete -c cwebp -x -o resize -d 'Resize picture to <w> <h> after any cropping'
113complete -c cwebp -o mt -d 'Use multi-threading if available'
114complete -c cwebp -o low_memory -d 'Reduce memory usage (slows encoding)'
115complete -c cwebp -x -o map -d 'Print map of extra info'
116complete -c cwebp -o print_psnr -d 'Print averaged PSNR distortion'
117complete -c cwebp -o print_ssim -d 'Print averaged SSIM distortion'
118complete -c cwebp -o print_lsim -d 'Print local-similarity distortion'
119complete -c cwebp -r -o d -k -a '(__fish_complete_suffix .pgm)' -d 'Dump compressed output to given PGM file'
120complete -c cwebp -x -o alpha_method -a "$alpha_method_opts" -d 'Transparency-compression method'
121complete -c cwebp -x -o alpha_filter -a "$alpha_filter_opts" -k -d 'Predictive filtering for alpha plane'
122complete -c cwebp -x -o exact -d 'Preserve RGB values in transparent area'
123complete -c cwebp -x -o blend_alpha -d 'Blend colors against background color (e.g. 0xc0e0d0)'
124complete -c cwebp -o noalpha -d 'Discard any transparency information'
125complete -c cwebp -o lossless -d 'Encode image losslessly'
126complete -c cwebp -x -o near_lossless -d 'Use near-lossless image preprocessing (integer 0…100:off; default: 100)'
127complete -c cwebp -x -o hint -a 'photo picture graph' -d 'Specify image-characteristics hint'
128
129complete -c cwebp -x -o metadata -a "$metadata_opts" -k -d 'Comma-separated list of metadata to copy, if present'
130
131complete -c cwebp -o short -d 'Condense printed messages'
132complete -c cwebp -o quiet -d 'Don\'t print anything'
133complete -c cwebp -o version -d 'Print version number and exit'
134complete -c cwebp -o noasm -d 'Disable all assembly optimizations'
135complete -c cwebp -o v -d 'Be verbose (print encoding/decoding times)'
136complete -c cwebp -o progress -d 'Report encoding progress'
137
138complete -c cwebp -o jpeg_like -d 'Roughly match expected JPEG size'
139complete -c cwebp -o af -d 'Auto-adjust filter strength'
140complete -c cwebp -x -o pre -d 'Pre-processing filter (integer)'
141
142complete -c cwebp -r -o o -k -a '(__fish_complete_suffix .webp)' -d 'Output to file'