From 0bc58b66a4850cdb8458a86c3d9a2fc81de82aa3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:14:42 +0200 Subject: Adding upstream version 1:2.11. Signed-off-by: Daniel Baumann --- completions/ant | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 completions/ant (limited to 'completions/ant') diff --git a/completions/ant b/completions/ant new file mode 100644 index 0000000..197c0e9 --- /dev/null +++ b/completions/ant @@ -0,0 +1,102 @@ +# bash completion for ant and phing -*- shell-script -*- + +_ant_parse_targets() +{ + local line basedir + + [[ $1 == */* ]] && basedir=${1%/*} || basedir=. + + # parse buildfile for targets + while read -rd '>' line; do + if [[ $line =~ \<(target|extension-point)[[:space:]].*name=[\"\']([^\"\']+) ]]; then + targets+=" ${BASH_REMATCH[2]}" + fi + done <$1 + + # parse imports + while read -rd '>' line; do + if [[ $line =~ \/dev/null && + complete -C complete-ant-cmd.pl -F _ant ant || : + +# ex: filetype=sh -- cgit v1.2.3