# eog(1) completion -*- shell-script -*- proc _eog { var cur = '', prev = '', words = '', cword = '', split = '' _init_completion -s || return match $prev { with -'?'|--help|--help-all|--help-gtk return } $split && return if [[ $cur == -* ]] { setglobal COMPREPLY = '( '$( compgen -W '$( _parse_help "$1" --help-all )' \ -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir '@(ani|?(w)bmp|gif|ico|j2k|jp[cefgx2]|jpeg|pcx|p[gp]m|pn[gm]|ras|svg?(z)|tga|tif?(f)|x[bp]m)' } && complete -F _eog eog # ex: ts=4 sw=4 et filetype=sh