[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:53 UTC 2013


The following commit has been merged in the master branch:
commit 29f5a4a5f4403f246e22fb8c2133e8696d2f0e41
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Mar 16 20:49:41 2013 +0200

    luac: New completion.

diff --git a/completions/Makefile.am b/completions/Makefile.am
index 7f628b5..c195fb5 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -183,6 +183,7 @@ bashcomp_DATA = a2x \
 		lrzip \
 		lsof \
 		lua \
+		luac \
 		luseradd \
 		luserdel \
 		lvm \
diff --git a/completions/lua b/completions/luac
similarity index 61%
copy from completions/lua
copy to completions/luac
index 83dc736..a033073 100644
--- a/completions/lua
+++ b/completions/luac
@@ -1,12 +1,16 @@
-# lua(1) completion                                        -*- shell-script -*-
+# luac(1) completion                                       -*- shell-script -*-
 
-_lua()
+_luac()
 {
     local cur prev words cword
     _init_completion || return
 
     case $prev in
-        -e|-l|-v|-)
+        -v|-)
+            return
+            ;;
+        -o)
+            _filedir
             return
             ;;
     esac
@@ -16,8 +20,8 @@ _lua()
         return
     fi
 
-    _filedir 'l@(ua|?(ua)c)'
+    _filedir lua
 } &&
-complete -F _lua lua
+complete -F _luac luac
 
 # ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/luac.exp b/test/completion/luac.exp
new file mode 100644
index 0000000..63f49ee
--- /dev/null
+++ b/test/completion/luac.exp
@@ -0,0 +1 @@
+assert_source_completions luac
diff --git a/test/lib/completions/cc.exp b/test/lib/completions/luac.exp
similarity index 80%
copy from test/lib/completions/cc.exp
copy to test/lib/completions/luac.exp
index eb722de..d7cfb23 100644
--- a/test/lib/completions/cc.exp
+++ b/test/lib/completions/luac.exp
@@ -11,9 +11,7 @@ proc teardown {} {
 setup
 
 
-assert_complete_any "cc "
-
-
+assert_complete_any "luac "
 sync_after_int
 
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list