completions/configure: Use first token ending in "configure"

Fixes #5376.

[ci skip]
This commit is contained in:
Fabian Homborg 2018-11-30 11:27:02 +01:00
parent f0aa63cc11
commit 42ec4aa2dd

View File

@ -12,5 +12,9 @@ complete -c configure -l host -d "Cross-compile to build programs to run on HOST
complete -c configure -l target -d "Configure for building compilers for TARGET" -x complete -c configure -l target -d "Configure for building compilers for TARGET" -x
# use autoconf's --help to generate completions: # use autoconf's --help to generate completions:
echo "sourcing configure completions" complete -c 'configure' -a '(for tok in (commandline -opc)
complete -c 'configure' -a '(__fish_parse_configure (commandline | string replace -r "(.*configure) .*" "\$1"))' if string match -q "*configure" -- $tok
__fish_parse_configure $tok
break
end
end)'