Completion into braces does not work correctly in some instances
where filenames start with the same string but with different
capitalizations thereof and localized sorting is enabled
Repeat-By:
Use a localized bash and go into an empty directory.
create the files "ya, xYb and xyc
Type M-{
This expands to xy{a,b,c}, with the y incorrectly lowercase for xYb
Set LC_ALL=C
Type M-{
The expansion is now correct: x{Yb,y{a,c}}
Fix:
A quick look at the code suggests that gcd determination in
really_munge_braces depends on the array being sorted in ascending
(byte) order, as supplied if the locale is set to C. If the sorting is
localized, lowercase and uppercase are usually treated equally, and the
gcd determination gets confused. A fix would be to use byte value
sorting for complete-into-braces
[Prev in Thread]
Current Thread
[Next in Thread]
complete-into-braces incorrect when using localized sorting,
Torsten Nahm<=