# opera(1) completion -*- shell-script -*- proc _opera { var cur = '', prev = '', words = '', cword = '' _init_completion || return match $prev { with ?(-)-widget|?(-)-urllist|?(-)-uiparserlog|?(-)-uiwidgetsparserlog|\ ?(-)-profilinglog _filedir return with ?(-)-[psb]d _filedir -d return with ?(-)-remote setglobal COMPREPLY = '( '$( compgen -W 'openURL\\( openFile\\( openM2\\( openComposer\\( addBookmark\\( raise\\(\\) lower\\(\\)' \ -- "$cur" ) ) [[ $COMPREPLY == *\( ]] && compopt -o nospace return with ?(-)-windowname setglobal COMPREPLY = '( '$( compgen -W 'first last opera{1..9}' -- "$cur" ) ) return with ?(-)-geometry|?(-)-window|?(-)-display|?(-)-urllistloadtimeout|\ ?(-)-delaycustomizations|?(-)-dialogtest|?(-)-inidialogtest|\ ?(-)-gputest # argument required but no completions available return } if [[ "$cur" == -* ]] { setglobal COMPREPLY = '( '$( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir '@(?([xX]|[sS])[hH][tT][mM]?([lL]))' } && complete -F _opera opera # ex: ts=4 sw=4 et filetype=sh