Skip to content

Ant build file completion for Fish.

Here is a VERY basic completion for Ant build files for Fish. It was based on the Ant completion from Zsh. Save it to ~/.config/fish/completions/ant.fish.


function __fish_complete_targets -d "Print list of targets from build.xml"
if test -f build.xml
sed -n "s/ *<target name=[\"']\([^\"']*\)[\"'].*/\1/p” < build.xml
end
end

complete -x -c ant -a “(__fish_complete_targets)”
EDIT: This has been added to Fish version 1.22.2

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*