scop / bash-completion

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

000_bash_completion_compat.bash sourced last in some locales #1207

Closed liskin closed 2 weeks ago

liskin commented 1 month ago

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

  1. install something that relies on have being available, such as pmount 0.9.23-7.1 in Debian
  2. 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)

Additional context

This glob: https://github.com/scop/bash-completion/blob/35293af0aaa2d37cee5549d3687004a045003578/bash_completion#L3323 needs to be evaluated with LC_COLLATE=C.

akinomyoga commented 2 weeks ago

@liskin Thanks for the report. We've added a fix in #1212.