[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-443-gb9a5f50

Ville Skyttä ville.skytta at iki.fi
Thu Sep 29 20:11:40 UTC 2011


The following commit has been merged in the master branch:
commit e1a3492261d0d9fed79d72cbe23839e7fb70f396
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Sep 29 22:57:59 2011 +0300

    prelink: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index ae792b0..a121a89 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -134,6 +134,7 @@ bashcomp_DATA = abook \
 		postfix \
 		postgresql \
 		povray \
+		prelink \
 		procps \
 		protoc \
 		puppet \
diff --git a/completions/gnome-mplayer b/completions/prelink
similarity index 51%
copy from completions/gnome-mplayer
copy to completions/prelink
index ee93684..017d543 100644
--- a/completions/gnome-mplayer
+++ b/completions/prelink
@@ -1,24 +1,28 @@
-have gnome-mplayer || return
+have prelink || return
 
-_gnome_mplayer()
+_prelink()
 {
     local cur prev words cword split
     _init_completion -s || return
 
     case $prev in
-        -'?'|--help|--help-all|--help-gtk)
+        -'?'|--help|--usage|-V|--version|-r|--reloc-only)
             return
             ;;
-        --showcontrols|--showsubtitles|--autostart)
-            COMPREPLY=( $( compgen -w '0 1' -- "$cur" ) )
+        -b|--black-list|--dynamic-linker|--undo-output)
+            _filedir
             return
             ;;
-        --subtitle)
-            _filedir '@(srt|sub|txt|utf|rar|mpsub|smi|js|ssa|ass)'
+        -c|--config-file)
+            _filedir conf
             return
             ;;
-        --tvdriver)
-            COMPREPLY=( $( compgen -W 'v4l v4l2' -- "$cur" ) )
+        -C|--cache)
+            _filedir cache
+            return
+            ;;
+        --ld-library-path)
+            _filedir -d
             return
             ;;
     esac
@@ -26,15 +30,14 @@ _gnome_mplayer()
     $split && return
 
     if [[ $cur == -* ]]; then
-        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help-all )' \
-            -- "$cur" ) )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
         return
     fi
 
     _filedir
 } &&
-complete -F _gnome_mplayer gnome-mplayer
+complete -F _prelink prelink
 
 # Local variables:
 # mode: shell-script
diff --git a/test/completion/prelink.exp b/test/completion/prelink.exp
new file mode 100644
index 0000000..d1fbb8e
--- /dev/null
+++ b/test/completion/prelink.exp
@@ -0,0 +1 @@
+assert_source_completions prelink
diff --git a/test/lib/completions/arping.exp b/test/lib/completions/prelink.exp
similarity index 67%
copy from test/lib/completions/arping.exp
copy to test/lib/completions/prelink.exp
index 531bb07..4a49366 100644
--- a/test/lib/completions/arping.exp
+++ b/test/lib/completions/prelink.exp
@@ -11,10 +11,10 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "arping "
+assert_complete_any "prelink "
 sync_after_int
 
-assert_complete_any "arping -"
+assert_complete_any "prelink -"
 sync_after_int
 
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list