[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-25-gf379e92
Igor Murzov
e-mail at date.by
Thu Aug 9 11:52:23 UTC 2012
The following commit has been merged in the master branch:
commit 3c49af9ec97b66553c3d756de8f4b5a5f8a54708
Author: Igor Murzov <e-mail at date.by>
Date: Thu Aug 9 15:36:08 2012 +0400
opera: Handle options.
diff --git a/bash_completion b/bash_completion
index 0cf707d..b51f38b 100644
--- a/bash_completion
+++ b/bash_completion
@@ -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
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 13fc83b..82bf55d 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -221,6 +221,7 @@ bashcomp_DATA = a2x \
nslookup \
ntpdate \
openssl \
+ opera \
p4 \
pack200 \
passwd \
diff --git a/completions/opera b/completions/opera
new file mode 100644
index 0000000..6cbfbac
--- /dev/null
+++ b/completions/opera
@@ -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
diff --git a/test/completion/opera.exp b/test/completion/opera.exp
new file mode 100644
index 0000000..9ab6a08
--- /dev/null
+++ b/test/completion/opera.exp
@@ -0,0 +1 @@
+assert_source_completions opera
diff --git a/test/lib/completions/awk.exp b/test/lib/completions/opera.exp
similarity index 80%
copy from test/lib/completions/awk.exp
copy to test/lib/completions/opera.exp
index 260dabc..9b66640 100644
--- a/test/lib/completions/awk.exp
+++ b/test/lib/completions/opera.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "awk "
-
-
+assert_complete_any "opera "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list