From 1853c7441a576c9f6fed87de94e04f7dc777a089 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Tue, 11 Dec 2001 20:25:53 +0000 Subject: [PATCH] ant completion added --- bash_completion | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index 013499bc..c9aff894 100644 --- a/bash_completion +++ b/bash_completion @@ -2,7 +2,7 @@ # # # @@ -1336,7 +1336,26 @@ _p4() } [ "$have" ] && complete -F _p4 -o default p4 g4 -# +# ant completion is modified from the original submitted by +# Claus-Peter Klas +# +have ant && +_ant_targets() +{ + COMPREPLY=() + local gcmd + + # if we have a partial word to complete, restrict completions to + # matches of that word + [ ! -f build.xml ] && return 0 + + [ -n "$2" ] && gcmd='grep "^$2"' || gcmd=cat + + COMPREPLY=( $( awk 'BEGIN {FS="\""} /\