[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-146-g29f5a4a

Ville Skyttä ville.skytta at iki.fi
Sat Mar 16 18:49:51 UTC 2013


The following commit has been merged in the master branch:
commit 99153fb1ef75b9beec2d85966883bf3e99d095ad
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Mar 16 20:48:15 2013 +0200

    lua: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index 1160813..7f628b5 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -182,6 +182,7 @@ bashcomp_DATA = a2x \
 		lpr \
 		lrzip \
 		lsof \
+		lua \
 		luseradd \
 		luserdel \
 		lvm \
diff --git a/completions/ssh-add b/completions/lua
similarity index 52%
copy from completions/ssh-add
copy to completions/lua
index 1d56368..83dc736 100644
--- a/completions/ssh-add
+++ b/completions/lua
@@ -1,23 +1,23 @@
-# ssh-add(1) completion                                    -*- shell-script -*-
+# lua(1) completion                                        -*- shell-script -*-
 
-_ssh_add()
+_lua()
 {
     local cur prev words cword
     _init_completion || return
 
     case $prev in
-        -t|-s|-e)
+        -e|-l|-v|-)
             return
             ;;
     esac
 
     if [[ $cur == -* ]]; then
-        COMPREPLY=( $( compgen -W '$( _parse_help "$1" -? )' -- "$cur" ) )
+        COMPREPLY=( $( compgen -W "$( _parse_help "$1" )" -- "$cur" ) )
         return
     fi
 
-    _filedir
+    _filedir 'l@(ua|?(ua)c)'
 } &&
-complete -F _ssh_add ssh-add
+complete -F _lua lua
 
 # ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/lua.exp b/test/completion/lua.exp
new file mode 100644
index 0000000..a5774f4
--- /dev/null
+++ b/test/completion/lua.exp
@@ -0,0 +1 @@
+assert_source_completions lua
diff --git a/test/lib/completions/eog.exp b/test/lib/completions/lua.exp
similarity index 81%
copy from test/lib/completions/eog.exp
copy to test/lib/completions/lua.exp
index b708c56..864b1bf 100644
--- a/test/lib/completions/eog.exp
+++ b/test/lib/completions/lua.exp
@@ -11,7 +11,7 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "eog "
+assert_complete_any "lua "
 sync_after_int
 
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list