Relax XML parsing regexes for bash_completion

Unnecessarily strict regex was failing for some unknown reason on OS X. Easier to just relax the regex than understand what's wrong (and then relax the regex).
Fixes #782
This commit is contained in:
Michael Ansel 2016-06-09 14:34:31 -07:00
parent 6b27d7392a
commit da4446a822
1 changed files with 3 additions and 3 deletions

View File

@ -30,13 +30,13 @@ tools.html: $(srcdir)/tools.xml $(wildcard $(srcdir)/*.1.xml) $(wildcard $(srcdi
@echo $< $@
@cat $(srcdir)/completion-template \
| sed "s,ALLOPTS,\
$(shell sed -n 's,\s\s\s*<option>\([^<]*\)</option>.*,\1,pg' $< \
$(shell sed -n 's,.*<option>\([^<]*\)</option>.*,\1,pg' $< \
| sort -u | grep -- '^\-' | tr '\n' ' ')," \
| sed "s,OPTSWITHARGS,\
$(shell sed -n 's,\s\s\s*<option>\([^<]*\)</option>.*<replaceable>.*,\1,pg' $< \
$(shell sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*,\1,pg' $< \
| sort -u | grep -- '^\-' | tr '\n' '|' | sed 's,|$$,,')," \
| sed "s,FILEOPTS,\
$(shell sed -n 's,\s\s\s*<option>\([^<]*\)</option>.*<replaceable>.*filename.*,\1,pg' $< \
$(shell sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*filename.*,\1,pg' $< \
| sort -u | grep -- '^\-' | tr '\n' '|')," \
| sed "s,FUNCTION_NAME,$(shell echo $@ | sed s,-,_,g)," \
| sed "s,PROGRAM_NAME,$@," \