Scripts in /etc/bash_completion.d/ often rely on the compatibility stuff like the have function but some locales order numbers last, so the compat stuff isn't available.
To reproduce
install something that relies on have being available, such as pmount 0.9.23-7.1 in Debian
LANG=cs_CZ.UTF-8 bash
Expected behavior
no errors, as opposed to bash: have: příkaz nenalezen (which means "command not found")
Versions (please complete the following information)
[X] Operating system name/distribution and version: Debian testing (as of 2024-06-03)
Describe the bug
Scripts in /etc/bash_completion.d/ often rely on the compatibility stuff like the
have
function but some locales order numbers last, so the compat stuff isn't available.To reproduce
have
being available, such as pmount 0.9.23-7.1 in DebianLANG=cs_CZ.UTF-8 bash
Expected behavior
no errors, as opposed to
bash: have: příkaz nenalezen
(which means "command not found")Versions (please complete the following information)
echo "$BASH_VERSION"
: 5.2.21(1)-release(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}")
: 2.14.0Additional context
This glob: https://github.com/scop/bash-completion/blob/35293af0aaa2d37cee5549d3687004a045003578/bash_completion#L3323 needs to be evaluated with
LC_COLLATE=C
.