Use ant's complete-ant-cmd.pl if it's available. Suggested by Greg Kedge
<gkedge@paychex.com>.
This commit is contained in:
parent
9f2d303f6d
commit
086cd1e748
@ -1,7 +1,7 @@
|
|||||||
# bash_completion - programmable completion functions for bash 3.x
|
# bash_completion - programmable completion functions for bash 3.x
|
||||||
# (backwards compatible with bash 2.05b)
|
# (backwards compatible with bash 2.05b)
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.859 2006/02/25 13:02:25 ianmacd Exp $
|
# $Id: bash_completion,v 1.860 2006/02/25 13:36:12 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -3165,7 +3165,7 @@ complete -F _root_command $filenames sudo fakeroot really
|
|||||||
|
|
||||||
# ant(1) completion
|
# ant(1) completion
|
||||||
#
|
#
|
||||||
have ant &&
|
have ant && {
|
||||||
_ant()
|
_ant()
|
||||||
{
|
{
|
||||||
local cur prev buildfile i
|
local cur prev buildfile i
|
||||||
@ -3210,8 +3210,11 @@ _ant()
|
|||||||
$( awk -F'"' '/<target [^n]/ {if ($1 ~ /name=/) { print $2 } else if ($3 ~ /name=/) {print $4} else if ($5 ~ /name=/) {print $6}}' \
|
$( awk -F'"' '/<target [^n]/ {if ($1 ~ /name=/) { print $2 } else if ($3 ~ /name=/) {print $4} else if ($5 ~ /name=/) {print $6}}' \
|
||||||
$buildfile | grep "^$cur" ) )
|
$buildfile | grep "^$cur" ) )
|
||||||
fi
|
fi
|
||||||
} &&
|
}
|
||||||
|
have complete-ant-cmd.pl && \
|
||||||
|
complete -C complete-ant-cmd.pl -F _ant $filenames ant || \
|
||||||
complete -F _ant $filenames ant
|
complete -F _ant $filenames ant
|
||||||
|
}
|
||||||
|
|
||||||
have nslookup &&
|
have nslookup &&
|
||||||
_nslookup()
|
_nslookup()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user