scop / bash-completion

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

fix(_comp_expand_glob): set LC_COLLATE for the sorting order #1212

Closed akinomyoga closed 2 weeks ago

akinomyoga commented 3 weeks ago

Fixes #1207. Now _comp_expand_glob adjusts LC_COLLATE (2d7b9b136) and the files in compatibility directories are generated by _comp_expand_glob (0beaa288b).

In addition to the fix, I modified _comp_expand_glob to take account of the new GLOBSORT added in Bash 5.3 (1322589f1).

This is just refactoring, but I also moved the codes to list the files in a function since the number of temporary global variables is increasing (f6c99d7). Only the list of the files to source is written to the global variable _comp__init_startup_configs, and the files are sourced outside the function.