[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-410-g346624b

Ville Skyttä ville.skytta at iki.fi
Thu Jul 21 21:15:54 UTC 2011


The following commit has been merged in the master branch:
commit 346624bf5b86989392bb0b00183b458d72e9f01c
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Jul 22 00:12:29 2011 +0300

    gnome-mplayer: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index dce9047..89d4c62 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -55,6 +55,7 @@ bashcomp_DATA = abook \
 		getent \
 		gkrellm \
 		gnatmake \
+		gnome-mplayer \
 		gpg \
 		gpg2 \
 		gzip \
diff --git a/completions/evince b/completions/gnome-mplayer
similarity index 50%
copy from completions/evince
copy to completions/gnome-mplayer
index 93f35bd..ee93684 100644
--- a/completions/evince
+++ b/completions/gnome-mplayer
@@ -1,23 +1,29 @@
-have evince || return
+have gnome-mplayer || return
 
-_evince()
+_gnome_mplayer()
 {
     local cur prev words cword split
     _init_completion -s || return
 
     case $prev in
-        --help*|-h|--sm-client-id|--class|--name|--screen|--gdk-debug|\
-        --gdk-no-debug|--gtk-module|--gtk-debug|--gtk-no-debug|\
-        -p|--page-label|-i|--page-index|-l|--find|--display)
+        -'?'|--help|--help-all|--help-gtk)
             return
             ;;
-        --sm-client-state-file)
-            _filedir
+        --showcontrols|--showsubtitles|--autostart)
+            COMPREPLY=( $( compgen -w '0 1' -- "$cur" ) )
+            return
+            ;;
+        --subtitle)
+            _filedir '@(srt|sub|txt|utf|rar|mpsub|smi|js|ssa|ass)'
+            return
+            ;;
+        --tvdriver)
+            COMPREPLY=( $( compgen -W 'v4l v4l2' -- "$cur" ) )
             return
             ;;
     esac
 
-    $split && return 0
+    $split && return
 
     if [[ $cur == -* ]]; then
         COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help-all )' \
@@ -26,9 +32,9 @@ _evince()
         return
     fi
 
-    _filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)'
+    _filedir
 } &&
-complete -F _evince evince
+complete -F _gnome_mplayer gnome-mplayer
 
 # Local variables:
 # mode: shell-script
diff --git a/test/completion/gnome-mplayer.exp b/test/completion/gnome-mplayer.exp
new file mode 100644
index 0000000..79c0cb1
--- /dev/null
+++ b/test/completion/gnome-mplayer.exp
@@ -0,0 +1 @@
+assert_source_completions gnome-mplayer
diff --git a/test/lib/completions/aclocal.exp b/test/lib/completions/gnome-mplayer.exp
similarity index 76%
copy from test/lib/completions/aclocal.exp
copy to test/lib/completions/gnome-mplayer.exp
index da133aa..fd635bf 100644
--- a/test/lib/completions/aclocal.exp
+++ b/test/lib/completions/gnome-mplayer.exp
@@ -11,7 +11,7 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "aclocal "
+assert_complete_any "gnome-mplayer "
 
 
 sync_after_int

-- 
bash-completion



More information about the Bash-completion-commits mailing list