fish-shell/share/functions/__fish_complete_ant_targets.fish
liljencrantz 2aad9d5a95 Fix silly type I caused when cleaning up ant completions. Thanks to Steven Knight for the report
darcs-hash:20080112184928-75c98-286284df7196a479c6a2789120705f1764d619b9.gz
2008-01-13 04:49:28 +10:00

15 lines
458 B
Fish

function __fish_complete_ant_targets -d "Print list of targets from build.xml and imported files"
set -l buildfile "build.xml"
if test -f $buildfile
# show ant targets
__fish_filter_ant_targets $buildfile
# find files with buildfile
set files (sed -n "s/^.*<import[^>]* file=[\"']\([^\"']*\)[\"'].*\$/\1/p" < $buildfile)
# iterate through files and display their targets
for file in $files;
__fish_filter_ant_targets $file
end
end
end