Package: ipset
Version: 7.22-1+b1
Severity: normal
On Debian 13.8 (trixie, amd64), ipset's completion function raises
"syntax error: unexpected end of file" when it tries to define
_ipset_known_hosts. This occurs with bash 5.2.37-2+b10 and
bash-completion 1:2.16.0-7.
To reproduce independently of the syntax error at line 363, start
bash --noprofile --norc and run these two commands. The sed range
selects the complete eval statement from the unmodified trixie file:
source /usr/share/bash-completion/bash_completion
source <(sed -n '1004,1006p' /usr/share/bash-completion/completions/ipset)
The second command reports a syntax error and exits with status 2.
On this system, _known_hosts_real exists. Its body is a single call
to _comp_compgen_known_hosts "$@".
Debian's fix-bash-completion.patch removes the semicolon before the
closing brace of the generated function. With this wrapper, eval gets
no command terminator before the brace. I tested the same statement
with just the upstream semicolon restored: it defines
_ipset_known_hosts successfully.
Could you update the Debian patch for this version of bash-completion?
A related Ubuntu report is https://bugs.launchpad.net/bugs/2173038.
Thanks,
Thomas Deutschmann