scripts: update completion.pl to parse options from docs

Reported-by: kpcyrd on github
Fixes #16072
Closes #16789
This commit is contained in:
tiymat 2025-03-21 20:45:57 -02:30 committed by Daniel Stenberg
parent c329321bf9
commit d055a01ce9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 41 additions and 32 deletions

View file

@ -47,7 +47,7 @@ if CROSSCOMPILING
@echo "NOTICE: we can't generate zsh completion when cross-compiling!"
else # if not cross-compiling:
if test -z "$(PERL)"; then echo "No perl: can't install completion script"; else \
$(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell zsh > $@ ; fi
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell zsh > $@ ; fi
endif
endif
@ -57,7 +57,7 @@ if CROSSCOMPILING
@echo "NOTICE: we can't generate fish completion when cross-compiling!"
else # if not cross-compiling:
if test -z "$(PERL)"; then echo "No perl: can't install completion script"; else \
$(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell fish > $@ ; fi
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell fish > $@ ; fi
endif
endif