perl: Fix -dt: completion.

This commit is contained in:
Ville Skyttä 2013-06-03 00:22:19 +03:00
parent 18c28bb9a2
commit 97efc7ca08
2 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,10 @@ _perl()
temp=$cur temp=$cur
prev=${temp:0:2} prev=${temp:0:2}
cur=${temp:2} cur=${temp:2}
if [[ $prev == -d && $cur == t* ]]; then
prev=-dt
cur=${cur:1}
fi
optPrefix=-P$prev optPrefix=-P$prev
optSuffix=-S/ optSuffix=-S/
prefix=$prev prefix=$prev

View File

@ -117,4 +117,10 @@ sync_after_int
assert_complete_any "perl -m-File::" assert_complete_any "perl -m-File::"
sync_after_int sync_after_int
assert_complete_any "perl -d:"
sync_after_int
assert_complete_any "perl -dt:"
sync_after_int
teardown teardown