7c125358e In the first commit, I split the function _comp_compgen into two (for _comp_compgen <generator> and for _comp_compgen -- <options for builtin compgen>).
0ec92f2e8 In the second commit, I prepare an implementation for Bash 5.3 using compgen -V.
edit: Although the CI tests with Bash 5.3 are not set up, I locally ran tests with Bash 5.3 (more specifically, with the devel ranch of Bash) and confirmed that this change does not break the tests.
As mentioned in https://github.com/scop/bash-completion/issues/704#issuecomment-1515960552,
@algorythmic
has addedcompgen -V array_name
in the new version of Bash 5.3, which can be used to handle the completions including newline characters properly._comp_compgen
into two (for_comp_compgen <generator>
and for_comp_compgen -- <options for builtin compgen>
).compgen -V
.edit: Although the CI tests with Bash 5.3 are not set up, I locally ran tests with Bash 5.3 (more specifically, with the
devel
ranch of Bash) and confirmed that this change does not break the tests.