completions/ant: don't look at tokens from adjacent commands

This commit is contained in:
Johannes Altmanninger 2024-01-06 08:42:25 +01:00
parent 06de374ffd
commit f42b7d30b3

View File

@ -2,7 +2,7 @@
function __fish_complete_ant_targets -d "Print list of targets from build.xml and imported files"
function __get_buildfile -d "Get a buildfile that will be used by ant"
set -l tokens $argv # tokens from 'commandline -co'
set -l tokens $argv # tokens from 'commandline -opc'
set -l prev $tokens[1]
set -l buildfile "build.xml"
for token in $argv[2..-1]
@ -56,7 +56,7 @@ function __fish_complete_ant_targets -d "Print list of targets from build.xml an
end
# completion for ant targets
complete -x -c ant -a "(__fish_complete_ant_targets (commandline -co))"
complete -x -c ant -a "(__fish_complete_ant_targets (commandline -opc))"
# Script Options:
complete -f -c ant -l help -l h -d 'print help message and ant help'