[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-356-gf8fe310
Ville Skyttä
ville.skytta at iki.fi
Wed Jun 8 22:05:49 UTC 2011
The following commit has been merged in the master branch:
commit f8fe3106e163487cec06b02f8b373f0cf2d0289f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Jun 9 01:05:16 2011 +0300
javadoc: Implement -linkoffline two argument completion.
diff --git a/completions/java b/completions/java
index 1c333cd..0d51f56 100644
--- a/completions/java
+++ b/completions/java
@@ -250,7 +250,6 @@ _javadoc()
return 0
;;
-d|-link|-linkoffline)
- # TODO: -linkoffline takes two arguments
_filedir -d
return 0
;;
@@ -260,6 +259,12 @@ _javadoc()
;;
esac
+ # -linkoffline takes two arguments
+ if [[ $cword -gt 2 && ${words[$cword-2]} == -linkoffline ]]; then
+ _filedir -d
+ return
+ fi
+
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
else
diff --git a/test/lib/completions/javadoc.exp b/test/lib/completions/javadoc.exp
index 0af8a3d..79e8613 100644
--- a/test/lib/completions/javadoc.exp
+++ b/test/lib/completions/javadoc.exp
@@ -12,8 +12,14 @@ setup
assert_complete_any "javadoc "
+sync_after_int
+
+
+assert_complete {"bar bar.d/" foo.d/} "javadoc -linkoffline $::srcdir/fixtures/shared/default/"
+sync_after_int
+assert_complete {"bar bar.d/" foo.d/} "javadoc -nodeprecated -linkoffline foo $::srcdir/fixtures/shared/default/"
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list