1#compdef qiv
2
3_arguments -s \
4  '(- *)'{-h,--help}'[display help information]' \
5  '(- *)'{-v,--version}'[display version information]' \
6  '--display:display:_x_display' \
7  \*{-F,--file}'[read file names from file]:file:_files' \
8  '(-e --center)'{-e,--center}'[disable window centering]' \
9  '(-w --fixed_width -W --fixed_zoom)'{-w,--fixed_width}'[use window with specified width]:width' \
10  '(-w --fixed_width -W --fixed_zoom)'{-W,--fixed_zoom}'[use window with specified zoom factor]:zoom (percentage)' \
11  '(-x -y -z --root --root_t --root_s -f --file *)'{-x,--root}'[use image as the current desktop background, centered]:image file:_files' \
12  '(-x -y -z --root --root_t --root_s -f --file *)'{-y,--root_t}'[use image on the current desktop background, tiled]:image file:_files' \
13  '(-x -y -z --root --root_t --root_s -f --file *)'{-z,--root_s}'[use image as the current desktop background, stretched]:image file:_files' \
14  '(-m --maxpect)'{-m,--maxpect}'[expand image to fit screen size]' \
15  '(-t --scale_down)'{-t,--scale_down}'[shrink images to fit screen size]' \
16  '(-b --brightness)'{-b,--brightness}'[set brightness]:brightness (-32..32)' \
17  '(-c --contrast)'{-c,--contrast}'[set contrast]:contrast (-32..32)' \
18  '(-g --gamma)'{-g,--gamma}'[set gamma]:gamma (-32..32)' \
19  '(-n --no_filter)'{-n,--no_filter}'[disable filtering of images by extension]' \
20  '(-i --no_statusbar -I --statusbar)'{-i,--no_statusbar}'[disable statusbar]' \
21  '(-i --no_statusbar -I --statusbar)'{-I,--statusbar}'[enable statusbar]' \
22  '(-p --transparency)'{-p,--transparency}'[enable transparency]' \
23  '(-a --do_grab)'{-a,--do_grab}'[grab the pointer in windowed mode]' \
24  '(-G --disable_grab)'{-G,--disable_grab}'[disable pointer grabbing]' \
25  '(-o --bg_color)'{-o,--bg_color}'[set root background color]:color:_x_color' \
26  '(-s --slide)'{-s,--slide}'[start slideshow immediately]' \
27  '(-r --random)'{-r,--random}'[shuffle images for slideshow]' \
28  '(-R --readonly)'{-R,--readonly}'[disable delete feature]' \
29  '(-S --shuffle)'{-S,--shuffle}'[shuffle images for next/prev feature]' \
30  '(-d --delay)'{-d,--delay}'[set slideshow delay]:delay (seconds)' \
31  '(-f --fullscreen)'{-f,--fullscreen}'[use fullscreen window on startup]' \
32  '(-P --ignore_path_sort)'{-P,--ignore_path_sort}'[sort images by just the filename]' \
33  '(-M --merged_case_sort)'{-M,--merged_case_sort}'[sort images case-insensitively]' \
34  '(-N --numeric_sort)'{-N,--numeric_sort}'[numeric image sort]' \
35  '(-T --watch)'{-T,--watch}'[reload the image if it changes]' \
36  '*:image file:_files -g "*.(#i)(bmp|eim|gif|jp([eg]|eg)|pcx|png|p[pngb]m|tif(|f)|tga|x[pb]m)(-.)"'
37