The following commit has been merged in the master branch:
commit 43ec91619dd2293bbbfa7bdfd31f748f9686b79e
Author: Ville Skyttä <[email protected]>
Date:   Fri Nov 19 22:03:28 2010 +0200

    Add perl -m-/-M- completion.

diff --git a/completions/perl b/completions/perl
index 0862a8c..655ff65 100644
--- a/completions/perl
+++ b/completions/perl
@@ -43,6 +43,9 @@ _perl()
             return 0
             ;;
         -m|-M)
+            temp="${cur#-}"
+            prefix="$prefix${cur%$temp}"
+            cur="$temp"
             _perlmodules $1
             return 0
             ;;
diff --git a/test/lib/completions/perl.exp b/test/lib/completions/perl.exp
index 82a95bc..092aab3 100644
--- a/test/lib/completions/perl.exp
+++ b/test/lib/completions/perl.exp
@@ -105,4 +105,10 @@ sync_after_int
 assert_complete_any "perl -MFile::Spec::Func"
 sync_after_int
 
+assert_complete_any "perl -M-File"
+sync_after_int
+
+assert_complete_any "perl -m-File::"
+sync_after_int
+
 teardown

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to