fork/fish-shell

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

lengyijunFixes #8924 via `__fish_complete_suffix` overhaulaa65856ee

master
3.0 KiB42 linesraw
1complete -x -c optipng
2complete -x -c optipng -n '__fish_should_complete_switches; and __fish_is_first_arg' -a '-?\t"show help"'
3complete -x -c optipng -n '__fish_should_complete_switches; and __fish_is_first_arg' -a '-h\t"show help"'
4complete -x -c optipng -n '__fish_should_complete_switches; and __fish_is_first_arg' -a '-help\t"show help"'
5complete -x -c optipng -n __fish_should_complete_switches -a '-v\t"run in verbose mode"'
6complete -x -c optipng -n __fish_should_complete_switches -a '-backup\t"keep a backup of the modified files"'
7complete -x -c optipng -n __fish_should_complete_switches -a '-keep\t"keep a backup of the modified files"'
8complete -x -c optipng -n __fish_should_complete_switches -a '-clobber\t"overwrite existing files"'
9complete -x -c optipng -n __fish_should_complete_switches -a '-fix\t"enable error recovery"'
10complete -x -c optipng -n __fish_should_complete_switches -a '-force\t"enforce writing of a new output file"'
11complete -x -c optipng -n __fish_should_complete_switches -a '-preserve\t"preserve file attributes if possible"'
12complete -x -c optipng -n __fish_should_complete_switches -a '-quiet\t"run in quiet mode"'
13complete -x -c optipng -n __fish_should_complete_switches -a '-silent\t"run in quiet mode"'
14complete -x -c optipng -n __fish_should_complete_switches -a '-simulate\t"run in simulation mode"'
15complete -x -c optipng -n __fish_should_complete_switches -a '-full\t"produce a full IDAT report (might reduce speed)"'
16complete -x -c optipng -n __fish_should_complete_switches -a '-nb\t"no bit depth reduction"'
17complete -x -c optipng -n __fish_should_complete_switches -a '-nc\t"no color type reduction"'
18complete -x -c optipng -n __fish_should_complete_switches -a '-np\t"no palette reduction"'
19complete -x -c optipng -n __fish_should_complete_switches -a '-nx\t"no reductions"'
20complete -x -c optipng -n __fish_should_complete_switches -a '-nz\t"no IDAT recoding"'
21complete -x -c optipng -n __fish_should_complete_switches -a '-snip\t"cut one image out of multi-image or animation files"'
22complete -x -c optipng -n __fish_should_complete_switches -a '-strip\t"strip specified metadata objects (e.g. "all")"'
23
24for n in (seq 0 9)
25    complete -x -c optipng -n __fish_should_complete_switches -a "-o$n\t\"PNG optimization level $n\""
26end
27
28complete -x -c optipng -n __fish_should_complete_switches -a '-i0\t"PNG interlace type 0"'
29complete -x -c optipng -n __fish_should_complete_switches -a '-i1\t"PNG interlace type 1"'
30
31for n in (seq 0 5)
32    complete -x -c optipng -n __fish_should_complete_switches -a "-f$n\t'PNG delta filters $n'"
33end
34
35complete -x -c optipng -n __fish_should_complete_switches -a '-out\t"write output file to <file>"'
36complete -x -c optipng -n __fish_should_complete_switches -a '-dir\t"write output file(s) to <directory>"'
37complete -x -c optipng -n __fish_should_complete_switches -a '-log\t"log messages to <file>"'
38
39complete -x -c optipng -n 'not __fish_prev_arg_in -out -dir -log' \
40    -k -a '(__fish_complete_suffix .png .pnm .tiff .bmp)'
41
42complete -x -c optipng -n '__fish_prev_arg_in -dir' -a '(__fish_complete_directories)'