#
#  Bash completion rules for 'gmic'.
#
# This file has been generated automatically.
# Do not edit !
#

_gmic()
{
	local cur prev opts
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"
	opts="-help --help -debug --debug -add --add -sub --sub -mul --mul -mmul --mmul -div --div -pow --pow -min --min -max --max -mod --mod -and --and -or --or -xor --xor -bsl --bsl -bsr --bsr -rol --rol -ror --ror -eq --eq -neq --neq -gt --gt -ge --ge -lt --lt -le --le -cos --cos -sin --sin -sinc --sinc -tan --tan -cosh --cosh -sinh --sinh -tanh --tanh -acos --acos -asin --asin -atan --atan -atan2 --atan2 -abs --abs -sign --sign -sqr --sqr -sqrt --sqrt -exp --exp -log --log -log10 --log10 -endian --endian -set --set -fill --fill -threshold --threshold -cut --cut -normalize --normalize -round --round -equalize --equalize -quantize --quantize -noise --noise -rand --rand -norm --norm -orientation --orientation -map --map -index --index -rgb2hsv --rgb2hsv -rgb2hsl --rgb2hsl -rgb2hsi --rgb2hsi -rgb2yuv --rgb2yuv -rgb2ycbcr --rgb2ycbcr -rgb2xyz --rgb2xyz -rgb2lab --rgb2lab -rgb2cmy --rgb2cmy -rgb2cmyk --rgb2cmyk -hsv2rgb --hsv2rgb -hsl2rgb --hsl2rgb -hsi2rgb --hsi2rgb -yuv2rgb --yuv2rgb -ycbcr2rgb --ycbcr2rgb -xyz2rgb --xyz2rgb -lab2rgb --lab2rgb -cmy2rgb --cmy2rgb -cmyk2rgb --cmyk2rgb -resize --resize -resize2x --resize2x -resize3x --resize3x -crop --crop -autocrop --autocrop -channels --channels -slices --slices -lines --lines -columns --columns -rotate --rotate -mirror --mirror -shift --shift -transpose --transpose -invert --invert -solve --solve -trisolve --trisolve -eigen --eigen -dijkstra --dijkstra -permute --permute -unroll --unroll -split --split -append --append -warp --warp -deriche --deriche -blur --blur -bilateral --bilateral -denoise --denoise -smooth --smooth -median --median -sharpen --sharpen -convolve --convolve -correlate --correlate -erode --erode -dilate --dilate -inpaint --inpaint -gradient --gradient -structuretensors --structuretensors -edgetensors --edgetensors -hessian --hessian -haar --haar -ihaar --ihaar -fft --fft -ifft --ifft -histogram --histogram -distance --distance -eikonal --eikonal -watershed --watershed -label --label -displacement --displacement -sort --sort -mse --mse -psnr --psnr -point --point -line --line -polygon --polygon -spline --spline -ellipse --ellipse -text --text -graph --graph -axes --axes -grid --grid -quiver --quiver -flood --flood -image --image -object3d --object3d -plasma --plasma -mandelbrot --mandelbrot -remove --remove -keep --keep -move --move -reverse --reverse -name --name -rotation3d --rotation3d -point3d --point3d -line3d --line3d -triangle3d --triangle3d -quadrangle3d --quadrangle3d -circle3d --circle3d -box3d --box3d -cone3d --cone3d -cylinder3d --cylinder3d -torus3d --torus3d -plane3d --plane3d -sphere3d --sphere3d -elevation3d --elevation3d -isoline3d --isoline3d -isosurface3d --isosurface3d -streamline3d --streamline3d -add3d --add3d -sub3d --sub3d -mul3d --mul3d -div3d --div3d -center3d --center3d -normalize3d --normalize3d -rotate3d --rotate3d -color3d --color3d -opacity3d --opacity3d -reverse3d --reverse3d -primitives3d --primitives3d -texturize3d --texturize3d -split3d --split3d -light3d --light3d -focale3d --focale3d -pose3d --pose3d -specl3d --specl3d -specs3d --specs3d -double3d --double3d -mode3d --mode3d -moded3d --moded3d -background3d --background3d -skip --skip -return --return -status --status -exec --exec -do --do -while --while -repeat --repeat -done --done -break --break -continue --continue -if --if -elif --elif -else --else -endif --endif -local --local -endlocal --endlocal -check --check -quit --quit -push --push -push= --push= -pop --pop -error --error -progress --progress -input --input -output --output -verbose --verbose -print --print -echo --echo -warning --warning -command --command -type --type -shell --shell -shared --shared -camera --camera -display --display -display3d --display3d -plot --plot -window --window -wait --wait -select --select -h --h -+ --+ -- --- -* --* -** --** -/ --/ -^ --^ -<< --<< ->> -->> -== --== -!= --!= -> --> ->= -->= -< --< -<= --<= -= --= -f --f -t --t -c --c -n --n -r --r -s --s -a --a -rm --rm -k --k -mv --mv -rv --rv -nm --nm -+3d --+3d --3d ---3d -*3d --*3d -/3d --/3d -c3d --c3d -n3d --n3d -rot3d --rot3d -col3d --col3d -o3d --o3d -rv3d --rv3d -p3d --p3d -t3d --t3d -s3d --s3d -l3d --l3d -f3d --f3d -sl3d --sl3d -ss3d --ss3d -db3d --db3d -m3d --m3d -md3d --md3d -b3d --b3d -x --x -u --u -b --b -l --l -endl --endl -q --q -p --p -p= --p= -pp --pp -e --e -i --i -o --o -sh --sh -v --v -m --m -d --d -d3d --d3d -w --w"

	case "${prev}" in
		"-help" | "--help")
		COMPREPLY=( $(compgen -W "_command >") )
		return 0
		;;
		"-add" | "--add")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-sub" | "--sub")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-mul" | "--mul")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-mmul" | "--mmul")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-div" | "--div")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-pow" | "--pow")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-min" | "--min")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-max" | "--max")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-mod" | "--mod")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-and" | "--and")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-or" | "--or")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-xor" | "--xor")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-bsl" | "--bsl")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-bsr" | "--bsr")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-rol" | "--rol")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-ror" | "--ror")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-eq" | "--eq")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-neq" | "--neq")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-gt" | "--gt")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-ge" | "--ge")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-lt" | "--lt")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-le" | "--le")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-atan2" | "--atan2")
		COMPREPLY=( $(compgen -W "[image] >") )
		return 0
		;;
		"-set" | "--set")
		COMPREPLY=( $(compgen -W "value,_x[%],_y[%],_z[%],_c[%] >") )
		return 0
		;;
		"-fill" | "--fill")
		COMPREPLY=( $(compgen -W "value1,_value2,.. [image] formula") )
		return 0
		;;
		"-threshold" | "--threshold")
		COMPREPLY=( $(compgen -W "value[%],_soft (noargs)") )
		return 0
		;;
		"-cut" | "--cut")
		COMPREPLY=( $(compgen -W "{value0[%]|[image0]},{value1[%]|[image1]} [image] (noargs)") )
		return 0
		;;
		"-normalize" | "--normalize")
		COMPREPLY=( $(compgen -W "{value0[%]|[image0]},{value1[%]|[image1]} [image]") )
		return 0
		;;
		"-round" | "--round")
		COMPREPLY=( $(compgen -W "rounding_value>=0,_rounding_type (noargs)") )
		return 0
		;;
		"-equalize" | "--equalize")
		COMPREPLY=( $(compgen -W "nb_levels>0[%],_value0[%],_value1[%] >") )
		return 0
		;;
		"-quantize" | "--quantize")
		COMPREPLY=( $(compgen -W "nb_levels>0[%],_preserve_value_range={0|1} >") )
		return 0
		;;
		"-noise" | "--noise")
		COMPREPLY=( $(compgen -W "std_variation>=0[%],_noise_type >") )
		return 0
		;;
		"-rand" | "--rand")
		COMPREPLY=( $(compgen -W "{value0[%]|[image0]},{value1[%]|[image1]} [image]") )
		return 0
		;;
		"-map" | "--map")
		COMPREPLY=( $(compgen -W "[image] predefined_palette") )
		return 0
		;;
		"-index" | "--index")
		COMPREPLY=( $(compgen -W "{[image]|predefined_palette},_is_dithered={0|1},_map_palette={0|1} >") )
		return 0
		;;
		"-resize" | "--resize")
		COMPREPLY=( $(compgen -W "[image],_interpolation,_borders,_cx,_cy,_cz,_cc {[image_w]|width>0[%]},_{[image_h]|height>0[%]},_{[image_d]|depth>0[%]}, _{[image_s]|spectrum>0[%]},_interpolation,_borders,_cx,_cy,_cz,_cc (noargs)") )
		return 0
		;;
		"-crop" | "--crop")
		COMPREPLY=( $(compgen -W "x0[%],x1[%],_borders x0[%],y0[%],x1[%],y1[%],_borders x0[%],y0[%],z0[%],x1[%],y1[%],z1[%],_borders x0[%],y0[%],z0[%],c0[%],x1[%],y1[%],z1[%],c1[%],_borders (noargs)") )
		return 0
		;;
		"-autocrop" | "--autocrop")
		COMPREPLY=( $(compgen -W "value1,value2,.. >") )
		return 0
		;;
		"-channels" | "--channels")
		COMPREPLY=( $(compgen -W "{[image0]|c0[%]},_{[image1]|c1[%]} >") )
		return 0
		;;
		"-slices" | "--slices")
		COMPREPLY=( $(compgen -W "{[image0]|z0[%]},_{[image1]|z1[%]} >") )
		return 0
		;;
		"-lines" | "--lines")
		COMPREPLY=( $(compgen -W "{[image0]|y0[%]},_{[image1]|y1[%]} >") )
		return 0
		;;
		"-columns" | "--columns")
		COMPREPLY=( $(compgen -W "{[image0]|x0[%]},_{[image1]|x1[%]} >") )
		return 0
		;;
		"-rotate" | "--rotate")
		COMPREPLY=( $(compgen -W "angle,_borders,_interpolation,_cx[%],_cy[%],_zoom >") )
		return 0
		;;
		"-mirror" | "--mirror")
		COMPREPLY=( $(compgen -W "axis={x|y|z|c} >") )
		return 0
		;;
		"-shift" | "--shift")
		COMPREPLY=( $(compgen -W "vx[%],_vy[%],_vz[%],_vc[%],_borders >") )
		return 0
		;;
		"-solve" | "--solve")
		COMPREPLY=( $(compgen -W "[image] >") )
		return 0
		;;
		"-trisolve" | "--trisolve")
		COMPREPLY=( $(compgen -W "[image] >") )
		return 0
		;;
		"-dijkstra" | "--dijkstra")
		COMPREPLY=( $(compgen -W "starting_node>=0,ending_node>=0 >") )
		return 0
		;;
		"-permute" | "--permute")
		COMPREPLY=( $(compgen -W "permutation >") )
		return 0
		;;
		"-unroll" | "--unroll")
		COMPREPLY=( $(compgen -W "axis={x|y|z|c} >") )
		return 0
		;;
		"-split" | "--split")
		COMPREPLY=( $(compgen -W "axis={x|y|z|c},_nb_parts patch_x>0,_patch_y>0,_patch_z>0,_patch_v>0,borders value,_keep_splitting_values={+|-}") )
		return 0
		;;
		"-append" | "--append")
		COMPREPLY=( $(compgen -W "axis={x|y|z|c},_alignment >") )
		return 0
		;;
		"-warp" | "--warp")
		COMPREPLY=( $(compgen -W "[image],_is_relative={0|1},_interpolation={0|1},_borders,_nb_frames>0 >") )
		return 0
		;;
		"-deriche" | "--deriche")
		COMPREPLY=( $(compgen -W "std_variation>=0[%],order={0|1|2},axis={x|y|z|c},_borders >") )
		return 0
		;;
		"-blur" | "--blur")
		COMPREPLY=( $(compgen -W "std_variation>=0[%],_borders >") )
		return 0
		;;
		"-bilateral" | "--bilateral")
		COMPREPLY=( $(compgen -W "std_variation_s>0[%],std_variation_r>0 >") )
		return 0
		;;
		"-denoise" | "--denoise")
		COMPREPLY=( $(compgen -W "std_variation_s>=0,_std_variation_p>=0,_patch_size>0,_lookup_size>0,_smoothness, _fast_approx={0|1}") )
		return 0
		;;
		"-smooth" | "--smooth")
		COMPREPLY=( $(compgen -W "amplitude>=0,_sharpness>=0,_anisotropy,_alpha,_sigma,_dl>0,_da>0,_precision>0, interpolation,_fast_approx={0|1} nb_iterations>=0,_sharpness>=0,_anisotropy,_alpha,_sigma,_dt>0,0 [image],_amplitude>=0,_dl>0,_da>0,_precision>0,_interpolation,_fast_approx={0|1} [image],_nb_iters>=0,_dt>0,0") )
		return 0
		;;
		"-median" | "--median")
		COMPREPLY=( $(compgen -W "radius>=0 >") )
		return 0
		;;
		"-sharpen" | "--sharpen")
		COMPREPLY=( $(compgen -W "amplitude>=0 amplitude>=0,1,_edge>=0,_alpha,_sigma") )
		return 0
		;;
		"-convolve" | "--convolve")
		COMPREPLY=( $(compgen -W "[image],_borders,_is_normalized={0|1} >") )
		return 0
		;;
		"-correlate" | "--correlate")
		COMPREPLY=( $(compgen -W "[image],_borders,_is_normalized={0|1} >") )
		return 0
		;;
		"-erode" | "--erode")
		COMPREPLY=( $(compgen -W "size>=0 size_x>=0,size_y>=0,_size_z>=0 [image],_borders,_is_normalized={0|1}") )
		return 0
		;;
		"-dilate" | "--dilate")
		COMPREPLY=( $(compgen -W "size>=0 size_x>=0,size_y>=0,size_z>=0 [image],_borders,_is_normalized={0|1}") )
		return 0
		;;
		"-inpaint" | "--inpaint")
		COMPREPLY=( $(compgen -W "[image] >") )
		return 0
		;;
		"-gradient" | "--gradient")
		COMPREPLY=( $(compgen -W "{x|y|z}..{x|y|z},_scheme (noargs)") )
		return 0
		;;
		"-structuretensors" | "--structuretensors")
		COMPREPLY=( $(compgen -W "_scheme >") )
		return 0
		;;
		"-edgetensors" | "--edgetensors")
		COMPREPLY=( $(compgen -W "sharpness>=0,_anisotropy,_alpha,_sigma,is_sqrt={0|1} >") )
		return 0
		;;
		"-hessian" | "--hessian")
		COMPREPLY=( $(compgen -W "{xx|xy|xz|yy|yz|zz}..{xx|xy|xz|yy|yz|zz} (noargs)") )
		return 0
		;;
		"-haar" | "--haar")
		COMPREPLY=( $(compgen -W "scale>0 >") )
		return 0
		;;
		"-ihaar" | "--ihaar")
		COMPREPLY=( $(compgen -W "scale>0 >") )
		return 0
		;;
		"-histogram" | "--histogram")
		COMPREPLY=( $(compgen -W "nb_levels>0[%],_val0[%],_val1[%] >") )
		return 0
		;;
		"-distance" | "--distance")
		COMPREPLY=( $(compgen -W "isovalue >") )
		return 0
		;;
		"-eikonal" | "--eikonal")
		COMPREPLY=( $(compgen -W "nb_iterations>=0,_band_size>=0 >") )
		return 0
		;;
		"-watershed" | "--watershed")
		COMPREPLY=( $(compgen -W "[priority_image],_fill_lines={0|1} >") )
		return 0
		;;
		"-displacement" | "--displacement")
		COMPREPLY=( $(compgen -W "[source_image],_smoothness>=0,_precision>0,_nb_scales>=0,iteration_max>=0, is_backward={0|1}") )
		return 0
		;;
		"-sort" | "--sort")
		COMPREPLY=( $(compgen -W "_ordering={+|-},_axis={x|y|z|c} >") )
		return 0
		;;
		"-psnr" | "--psnr")
		COMPREPLY=( $(compgen -W "_max_value >") )
		return 0
		;;
		"-point" | "--point")
		COMPREPLY=( $(compgen -W "x[%],y[%],_z[%],_opacity,_color1,.. >") )
		return 0
		;;
		"-line" | "--line")
		COMPREPLY=( $(compgen -W "x0[%],y0[%],x1[%],y1[%],_opacity,_pattern,_color1,..\' >") )
		return 0
		;;
		"-polygon" | "--polygon")
		COMPREPLY=( $(compgen -W "N,x1[%],y1[%],..,xN[%],yN[%],_opacity,_pattern,_color1,.. >") )
		return 0
		;;
		"-spline" | "--spline")
		COMPREPLY=( $(compgen -W "x0[%],y0[%],u0[%],v0[%],x1[%],y1[%],u1[%],v1[%],_opacity,_pattern,_color1,.. >") )
		return 0
		;;
		"-ellipse" | "--ellipse")
		COMPREPLY=( $(compgen -W "x[%],y[%],R[%],r[%],_angle,_opacity,_color1,.. >") )
		return 0
		;;
		"-text" | "--text")
		COMPREPLY=( $(compgen -W "text,_x[%],_y[%],_font_height>=0,_opacity,_color1,.. >") )
		return 0
		;;
		"-graph" | "--graph")
		COMPREPLY=( $(compgen -W "[function_image],_plot_type,_vertex_type,_ymin,_ymax,_opacity,_pattern,_color1,.. \'formula\',_resolution>=0,_plot_type,_vertex_type,_xmin,xmax,_ymin,_ymax,_opacity,_pattern,_color1,..") )
		return 0
		;;
		"-axes" | "--axes")
		COMPREPLY=( $(compgen -W "x0,x1,y0,y1,_opacity,_pattern,_color1,.. >") )
		return 0
		;;
		"-grid" | "--grid")
		COMPREPLY=( $(compgen -W "sizex[%]>=0,sizey[%]>=0,_offsetx[%],_offsety[%],_opacity,_pattern,_color1,.. >") )
		return 0
		;;
		"-quiver" | "--quiver")
		COMPREPLY=( $(compgen -W "[function_image],_sampling>0,_factor,_is_arrow={0|1},_opacity,_pattern,_color1,.. >") )
		return 0
		;;
		"-flood" | "--flood")
		COMPREPLY=( $(compgen -W "x[%],_y[%],_z[%],_tolerance>=0,_opacity,_color1,.. >") )
		return 0
		;;
		"-image" | "--image")
		COMPREPLY=( $(compgen -W "[sprite],_x[%],_y[%],_z[%],_c[%],_opacity,_[sprite_mask],_max_opacity_mask >") )
		return 0
		;;
		"-object3d" | "--object3d")
		COMPREPLY=( $(compgen -W "[object3d],_x[%],_y[%],_z,_opacity,_is_zbuffer={0|1} >") )
		return 0
		;;
		"-plasma" | "--plasma")
		COMPREPLY=( $(compgen -W "alpha,_beta,_opacity >") )
		return 0
		;;
		"-mandelbrot" | "--mandelbrot")
		COMPREPLY=( $(compgen -W "z0r,z0i,z1r,z1i,_iteration_max>=0,_is_julia={0|1},_c0r,_c0i,_opacity >") )
		return 0
		;;
		"-move" | "--move")
		COMPREPLY=( $(compgen -W "position[%] >") )
		return 0
		;;
		"-name" | "--name")
		COMPREPLY=( $(compgen -W "name >") )
		return 0
		;;
		"-rotation3d" | "--rotation3d")
		COMPREPLY=( $(compgen -W "u,v,w,angle >") )
		return 0
		;;
		"-point3d" | "--point3d")
		COMPREPLY=( $(compgen -W "x0,y0,z0 >") )
		return 0
		;;
		"-line3d" | "--line3d")
		COMPREPLY=( $(compgen -W "x0,y0,z0,x1,y1,z1 >") )
		return 0
		;;
		"-triangle3d" | "--triangle3d")
		COMPREPLY=( $(compgen -W "x0,y0,z0,x1,y1,z1,x2,y2,z2 >") )
		return 0
		;;
		"-quadrangle3d" | "--quadrangle3d")
		COMPREPLY=( $(compgen -W "x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3 >") )
		return 0
		;;
		"-circle3d" | "--circle3d")
		COMPREPLY=( $(compgen -W "x0,y0,z0,radius>=0 >") )
		return 0
		;;
		"-box3d" | "--box3d")
		COMPREPLY=( $(compgen -W "size size_x,size_y,size_z") )
		return 0
		;;
		"-cone3d" | "--cone3d")
		COMPREPLY=( $(compgen -W "radius,_size_z,_nb_subdivisions>0 >") )
		return 0
		;;
		"-cylinder3d" | "--cylinder3d")
		COMPREPLY=( $(compgen -W "radius,_height,_nb_subdivisions>0 >") )
		return 0
		;;
		"-torus3d" | "--torus3d")
		COMPREPLY=( $(compgen -W "radius1,_radius2,_nb_subdivisions1>0,_nb_subdivisions2>0 >") )
		return 0
		;;
		"-plane3d" | "--plane3d")
		COMPREPLY=( $(compgen -W "size1_size2,_nb_subdivisions1>0,_nb_subdisivions2>0 >") )
		return 0
		;;
		"-sphere3d" | "--sphere3d")
		COMPREPLY=( $(compgen -W "radius,_nb_recursions>=0 >") )
		return 0
		;;
		"-elevation3d" | "--elevation3d")
		COMPREPLY=( $(compgen -W "z-factor [image] \'formula\',_x0,_y0,_x1,y1,_dx[%],_dy[%] (noargs)") )
		return 0
		;;
		"-isoline3d" | "--isoline3d")
		COMPREPLY=( $(compgen -W "isovalue[%] \'formula\',value,_x0,_y0,_x1,_y1,_dx>0[%],_dy>0[%]") )
		return 0
		;;
		"-isosurface3d" | "--isosurface3d")
		COMPREPLY=( $(compgen -W "isovalue[%] \'formula\',value,_x0,_y0,_z0,_x1,_y1,_z1,_size_x>0[%],_size_y>0[%],_size_z>0[%]") )
		return 0
		;;
		"-streamline3d" | "--streamline3d")
		COMPREPLY=( $(compgen -W "x,y,z,_L>=0,_dl>0,_interp,_is_backward={0|1},_is_oriented={0|1} \'formula\',x,y,z,_L>=0,_dl>0,_interp,_is_backward={0|1},_is_oriented={0|1}") )
		return 0
		;;
		"-add3d" | "--add3d")
		COMPREPLY=( $(compgen -W "tx,_ty,_tz [object3d] (noargs)") )
		return 0
		;;
		"-sub3d" | "--sub3d")
		COMPREPLY=( $(compgen -W "tx,_ty,_tz >") )
		return 0
		;;
		"-mul3d" | "--mul3d")
		COMPREPLY=( $(compgen -W "factor factor_x,factor_y,_factor_z") )
		return 0
		;;
		"-div3d" | "--div3d")
		COMPREPLY=( $(compgen -W "factor factor_x,factor_y,_factor_z") )
		return 0
		;;
		"-rotate3d" | "--rotate3d")
		COMPREPLY=( $(compgen -W "u,v,w,angle >") )
		return 0
		;;
		"-color3d" | "--color3d")
		COMPREPLY=( $(compgen -W "R,G,B,_opacity >") )
		return 0
		;;
		"-opacity3d" | "--opacity3d")
		COMPREPLY=( $(compgen -W "opacity >") )
		return 0
		;;
		"-primitives3d" | "--primitives3d")
		COMPREPLY=( $(compgen -W "mode >") )
		return 0
		;;
		"-texturize3d" | "--texturize3d")
		COMPREPLY=( $(compgen -W "[ind_texture],_[ind_coords] >") )
		return 0
		;;
		"-light3d" | "--light3d")
		COMPREPLY=( $(compgen -W "position_x,position_y,position_z [image] (noargs)") )
		return 0
		;;
		"-focale3d" | "--focale3d")
		COMPREPLY=( $(compgen -W "focale >") )
		return 0
		;;
		"-pose3d" | "--pose3d")
		COMPREPLY=( $(compgen -W "value1,..,value16 (noargs)") )
		return 0
		;;
		"-specl3d" | "--specl3d")
		COMPREPLY=( $(compgen -W "value>=0 >") )
		return 0
		;;
		"-specs3d" | "--specs3d")
		COMPREPLY=( $(compgen -W "value>=0 >") )
		return 0
		;;
		"-double3d" | "--double3d")
		COMPREPLY=( $(compgen -W "is_double={0|1} >") )
		return 0
		;;
		"-mode3d" | "--mode3d")
		COMPREPLY=( $(compgen -W "mode >") )
		return 0
		;;
		"-moded3d" | "--moded3d")
		COMPREPLY=( $(compgen -W "mode >") )
		return 0
		;;
		"-background3d" | "--background3d")
		COMPREPLY=( $(compgen -W "R,_G,_B [image] (noargs)") )
		return 0
		;;
		"-skip" | "--skip")
		COMPREPLY=( $(compgen -W "item >") )
		return 0
		;;
		"-status" | "--status")
		COMPREPLY=( $(compgen -W "item $variable") )
		return 0
		;;
		"-exec" | "--exec")
		COMPREPLY=( $(compgen -W "command >") )
		return 0
		;;
		"-while" | "--while")
		COMPREPLY=( $(compgen -W "boolean filename") )
		return 0
		;;
		"-repeat" | "--repeat")
		COMPREPLY=( $(compgen -W "nb_iterations >") )
		return 0
		;;
		"-if" | "--if")
		COMPREPLY=( $(compgen -W "boolean filename") )
		return 0
		;;
		"-elif" | "--elif")
		COMPREPLY=( $(compgen -W "boolean filename") )
		return 0
		;;
		"-check" | "--check")
		COMPREPLY=( $(compgen -W "expression >") )
		return 0
		;;
		"-push" | "--push")
		COMPREPLY=( $(compgen -W "item >") )
		return 0
		;;
		"-push=" | "--push=")
		COMPREPLY=( $(compgen -W "item >") )
		return 0
		;;
		"-error" | "--error")
		COMPREPLY=( $(compgen -W "message >") )
		return 0
		;;
		"-progress" | "--progress")
		COMPREPLY=( $(compgen -W "0<=value<=100 >") )
		return 0
		;;
		"-input" | "--input")
		_filedir
		return 0
		;;
		"-output" | "--output")
		_filedir
		return 0
		;;
		"-verbose" | "--verbose")
		COMPREPLY=( $(compgen -W "level {+|-}") )
		return 0
		;;
		"-echo" | "--echo")
		COMPREPLY=( $(compgen -W "message >") )
		return 0
		;;
		"-warning" | "--warning")
		COMPREPLY=( $(compgen -W "message >") )
		return 0
		;;
		"-command" | "--command")
		COMPREPLY=( $(compgen -W "filename \"string\"") )
		return 0
		;;
		"-type" | "--type")
		COMPREPLY=( $(compgen -W "datatype >") )
		return 0
		;;
		"-shared" | "--shared")
		COMPREPLY=( $(compgen -W "x0[%],x1[%],y[%],z[%],v[%] y0[%],y1[%],z[%],v[%] z0[%],z1[%],v[%] v0[%],v1[%] (noargs)") )
		return 0
		;;
		"-camera" | "--camera")
		COMPREPLY=( $(compgen -W "_camera_index>=-1,_nb_frames>0,_skip_frames>=0,release_camera={0|1} >") )
		return 0
		;;
		"-plot" | "--plot")
		COMPREPLY=( $(compgen -W "_plot_type,_vertex_type,_xmin,_xmax,_ymin,_ymax \'formula\',_resolution>=0,_plot_type,_vertex_type,_xmin,xmax,_ymin,_ymax") )
		return 0
		;;
		"-window" | "--window")
		COMPREPLY=( $(compgen -W "_width[%]>=-1,_height[%]>=-1,_normalization,_fullscreen,_title >") )
		return 0
		;;
		"-wait" | "--wait")
		COMPREPLY=( $(compgen -W "delay (noargs)") )
		return 0
		;;
		"-select" | "--select")
		COMPREPLY=( $(compgen -W "feature >") )
		return 0
		;;
		"-h" | "--h")
		COMPREPLY=( $(compgen -W "_command >") )
		return 0
		;;
		"-+" | "--+")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"--" | "---")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-*" | "--*")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-**" | "--**")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-/" | "--/")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-^" | "--^")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-<<" | "--<<")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"->>" | "-->>")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-==" | "--==")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-!=" | "--!=")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"->" | "-->")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"->=" | "-->=")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-<" | "--<")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-<=" | "--<=")
		COMPREPLY=( $(compgen -W "value[%] [image] filename \'formula\' (noargs)") )
		return 0
		;;
		"-=" | "--=")
		COMPREPLY=( $(compgen -W "value,_x[%],_y[%],_z[%],_c[%] >") )
		return 0
		;;
		"-f" | "--f")
		COMPREPLY=( $(compgen -W "value1,_value2,.. [image] formula") )
		return 0
		;;
		"-t" | "--t")
		COMPREPLY=( $(compgen -W "value[%],_soft (noargs)") )
		return 0
		;;
		"-c" | "--c")
		COMPREPLY=( $(compgen -W "{value0[%]|[image0]},{value1[%]|[image1]} [image] (noargs)") )
		return 0
		;;
		"-n" | "--n")
		COMPREPLY=( $(compgen -W "{value0[%]|[image0]},{value1[%]|[image1]} [image]") )
		return 0
		;;
		"-r" | "--r")
		COMPREPLY=( $(compgen -W "[image],_interpolation,_borders,_cx,_cy,_cz,_cc {[image_w]|width>0[%]},_{[image_h]|height>0[%]},_{[image_d]|depth>0[%]}, _{[image_s]|spectrum>0[%]},_interpolation,_borders,_cx,_cy,_cz,_cc (noargs)") )
		return 0
		;;
		"-s" | "--s")
		COMPREPLY=( $(compgen -W "axis={x|y|z|c},_nb_parts patch_x>0,_patch_y>0,_patch_z>0,_patch_v>0,borders value,_keep_splitting_values={+|-}") )
		return 0
		;;
		"-a" | "--a")
		COMPREPLY=( $(compgen -W "axis={x|y|z|c},_alignment >") )
		return 0
		;;
		"-mv" | "--mv")
		COMPREPLY=( $(compgen -W "position[%] >") )
		return 0
		;;
		"-nm" | "--nm")
		COMPREPLY=( $(compgen -W "name >") )
		return 0
		;;
		"-+3d" | "--+3d")
		COMPREPLY=( $(compgen -W "tx,_ty,_tz [object3d] (noargs)") )
		return 0
		;;
		"--3d" | "---3d")
		COMPREPLY=( $(compgen -W "tx,_ty,_tz >") )
		return 0
		;;
		"-*3d" | "--*3d")
		COMPREPLY=( $(compgen -W "factor factor_x,factor_y,_factor_z") )
		return 0
		;;
		"-/3d" | "--/3d")
		COMPREPLY=( $(compgen -W "factor factor_x,factor_y,_factor_z") )
		return 0
		;;
		"-rot3d" | "--rot3d")
		COMPREPLY=( $(compgen -W "u,v,w,angle >") )
		return 0
		;;
		"-col3d" | "--col3d")
		COMPREPLY=( $(compgen -W "R,G,B,_opacity >") )
		return 0
		;;
		"-o3d" | "--o3d")
		COMPREPLY=( $(compgen -W "opacity >") )
		return 0
		;;
		"-p3d" | "--p3d")
		COMPREPLY=( $(compgen -W "mode >") )
		return 0
		;;
		"-t3d" | "--t3d")
		COMPREPLY=( $(compgen -W "[ind_texture],_[ind_coords] >") )
		return 0
		;;
		"-l3d" | "--l3d")
		COMPREPLY=( $(compgen -W "position_x,position_y,position_z [image] (noargs)") )
		return 0
		;;
		"-f3d" | "--f3d")
		COMPREPLY=( $(compgen -W "focale >") )
		return 0
		;;
		"-sl3d" | "--sl3d")
		COMPREPLY=( $(compgen -W "value>=0 >") )
		return 0
		;;
		"-ss3d" | "--ss3d")
		COMPREPLY=( $(compgen -W "value>=0 >") )
		return 0
		;;
		"-db3d" | "--db3d")
		COMPREPLY=( $(compgen -W "is_double={0|1} >") )
		return 0
		;;
		"-m3d" | "--m3d")
		COMPREPLY=( $(compgen -W "mode >") )
		return 0
		;;
		"-md3d" | "--md3d")
		COMPREPLY=( $(compgen -W "mode >") )
		return 0
		;;
		"-b3d" | "--b3d")
		COMPREPLY=( $(compgen -W "R,_G,_B [image] (noargs)") )
		return 0
		;;
		"-x" | "--x")
		COMPREPLY=( $(compgen -W "command >") )
		return 0
		;;
		"-u" | "--u")
		COMPREPLY=( $(compgen -W "item $variable") )
		return 0
		;;
		"-p" | "--p")
		COMPREPLY=( $(compgen -W "item >") )
		return 0
		;;
		"-p=" | "--p=")
		COMPREPLY=( $(compgen -W "item >") )
		return 0
		;;
		"-e" | "--e")
		COMPREPLY=( $(compgen -W "message >") )
		return 0
		;;
		"-i" | "--i")
		_filedir
		return 0
		;;
		"-o" | "--o")
		_filedir
		return 0
		;;
		"-sh" | "--sh")
		COMPREPLY=( $(compgen -W "x0[%],x1[%],y[%],z[%],v[%] y0[%],y1[%],z[%],v[%] z0[%],z1[%],v[%] v0[%],v1[%] (noargs)") )
		return 0
		;;
		"-v" | "--v")
		COMPREPLY=( $(compgen -W "level {+|-}") )
		return 0
		;;
		"-m" | "--m")
		COMPREPLY=( $(compgen -W "filename \"string\"") )
		return 0
		;;
		"-w" | "--w")
		COMPREPLY=( $(compgen -W "_width[%]>=-1,_height[%]>=-1,_normalization,_fullscreen,_title >") )
		return 0
		;;
	esac

	if [[ "$cur" == -* ]] ; then
		COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
	else
		_filedir
	fi

}

complete -F _gmic -o filenames gmic
