opera: Handle options.
This commit is contained in:
parent
6158bd2d86
commit
3c49af9ec9
@ -1884,7 +1884,7 @@ _install_xspec '!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|
|
||||
_install_xspec '*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite
|
||||
_install_xspec '!*.@(zip|z|gz|tgz)' bzme
|
||||
# konqueror not here on purpose, it's more than a web/html browser
|
||||
_install_xspec '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon dillo elinks amaya firefox mozilla-firefox iceweasel google-chrome chromium-browser epiphany
|
||||
_install_xspec '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx galeon dillo elinks amaya firefox mozilla-firefox iceweasel google-chrome chromium-browser epiphany
|
||||
_install_xspec '!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|?(f)odt|ott|odm)' oowriter
|
||||
_install_xspec '!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|?(f)odp|otp)' ooimpress
|
||||
_install_xspec '!*.@(sxc|stc|xls?([bmx])|xlw|xlt?([mx])|[ct]sv|?(f)ods|ots)' oocalc
|
||||
|
@ -221,6 +221,7 @@ bashcomp_DATA = a2x \
|
||||
nslookup \
|
||||
ntpdate \
|
||||
openssl \
|
||||
opera \
|
||||
p4 \
|
||||
pack200 \
|
||||
passwd \
|
||||
|
46
completions/opera
Normal file
46
completions/opera
Normal file
@ -0,0 +1,46 @@
|
||||
# opera(1) completion -*- shell-script -*-
|
||||
|
||||
_opera()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
case "$prev" in
|
||||
?(-)-widget|?(-)-urllist|?(-)-uiparserlog|?(-)-uiwidgetsparserlog|\
|
||||
?(-)-profilinglog)
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
?(-)-[psb]d)
|
||||
_filedir -d
|
||||
return
|
||||
;;
|
||||
?(-)-remote)
|
||||
COMPREPLY=( $( compgen -W 'openURL\\( openFile\\( openM2\\(
|
||||
openComposer\\( addBookmark\\( raise\\(\\) lower\\(\\)' \
|
||||
-- "$cur" ) )
|
||||
[[ $COMPREPLY == *\( ]] && compopt -o nospace
|
||||
return
|
||||
;;
|
||||
?(-)-windowname)
|
||||
COMPREPLY=( $( compgen -W 'first last opera{1..9}' -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
?(-)-geometry|?(-)-window|?(-)-display|?(-)-urllistloadtimeout|\
|
||||
?(-)-delaycustomizations|?(-)-dialogtest|?(-)-inidialogtest|\
|
||||
?(-)-gputest)
|
||||
# argument required but no completions available
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||
return
|
||||
fi
|
||||
|
||||
_filedir '@(?([xX]|[sS])[hH][tT][mM]?([lL]))'
|
||||
} && complete -F _opera opera
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
1
test/completion/opera.exp
Normal file
1
test/completion/opera.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions opera
|
18
test/lib/completions/opera.exp
Normal file
18
test/lib/completions/opera.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "opera "
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user