scop / bash-completion

Programmable completion functions for bash
GNU General Public License v2.0
2.8k stars 376 forks source link

fix: use Bash 5.3 `compgen -V` to generate completions including newlines #1222

Open akinomyoga opened 2 weeks ago

akinomyoga commented 2 weeks ago

As mentioned in https://github.com/scop/bash-completion/issues/704#issuecomment-1515960552, @algorythmic has added compgen -V array_name in the new version of Bash 5.3, which can be used to handle the completions including newline characters properly.

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.