[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:42 UTC 2011


The following commit has been merged in the master branch:
commit b9a5f508e2b2ed9e4a06b2adae254debcc4a749a
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Sep 29 23:11:31 2011 +0300

    chrpath: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index a121a89..89d764e 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -21,6 +21,7 @@ bashcomp_DATA = abook \
 		cardctl \
 		cfengine \
 		chkconfig \
+		chrpath \
 		chsh \
 		cksfv \
 		clisp \
diff --git a/completions/reptyr b/completions/chrpath
similarity index 62%
copy from completions/reptyr
copy to completions/chrpath
index 527735b..5d40203 100644
--- a/completions/reptyr
+++ b/completions/chrpath
@@ -1,26 +1,28 @@
-# bash completion for reptyr(1)
+have chrpath || return
 
-have reptyr || return
-
-_reptyr()
+_chrpath()
 {
     local cur prev words cword
     _init_completion || return
 
     case $prev in
-        -l)
-            return 0
+        -v|--version|-h|--help)
+            return
+            ;;
+        -r|--replace)
+            _filedir -d
+            return
             ;;
     esac
 
     if [[ $cur == -* ]]; then
         COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
-        return 0
+        return
     fi
 
-    [[ $prev != +([0-9]) ]] && _pids
+    _filedir
 } &&
-complete -F _reptyr reptyr
+complete -F _chrpath chrpath
 
 # Local variables:
 # mode: shell-script
diff --git a/test/completion/chrpath.exp b/test/completion/chrpath.exp
new file mode 100644
index 0000000..eee81ec
--- /dev/null
+++ b/test/completion/chrpath.exp
@@ -0,0 +1 @@
+assert_source_completions chrpath
diff --git a/test/lib/completions/arping.exp b/test/lib/completions/chrpath.exp
similarity index 67%
copy from test/lib/completions/arping.exp
copy to test/lib/completions/chrpath.exp
index 531bb07..311628e 100644
--- a/test/lib/completions/arping.exp
+++ b/test/lib/completions/chrpath.exp
@@ -11,10 +11,10 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "arping "
+assert_complete_any "chrpath "
 sync_after_int
 
-assert_complete_any "arping -"
+assert_complete_any "chrpath -"
 sync_after_int
 
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list