Skip to content

Commit af91a70

Browse files
committed
fix(xmlwf): try _parse_help before _parse_usage
Recent versions of xmlwf no longer output a parseable usage formatted blurb at the top. And at least as of xmlwf from expat 2.2.9, even if it still does, parsing it as help yields better options coverage. Fixes related test on current Alpine. $ xmlwf -v xmlwf using expat_2.2.9 [...] $ xmlwf --help usage: xmlwf [-s] [-n] [-p] [-x] [-e ENCODING] [-w] [-r] [-d DIRECTORY] [-c | -m | -t] [-N] [FILE [FILE ...]] [...] $ xmlwf -v xmlwf using expat_2.4.1 [...] $ xmlwf --help usage: xmlwf [OPTIONS] [FILE ...] xmlwf -h xmlwf -v [...]
1 parent 3e7d089 commit af91a70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

completions/xmlwf

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ _xmlwf()
2121
esac
2222

2323
if [[ $cur == -* ]]; then
24-
COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur"))
24+
COMPREPLY=($(
25+
compgen -W '$(_parse_help "$1" || _parse_usage "$1")' -- "$cur"
26+
))
2527
return
2628
fi
2729

0 commit comments

Comments
 (0)