[Bash-completion-devel] Patch: no-ls-parse

Martin Ueding mu at martin-ueding.de
Thu Jul 26 19:46:32 UTC 2012


Okay, if someone would have some `01-foo` and another `02-bar` file in
there, it might be important to get the sorting right.

In my `/etc/bash_completion.d/`, there are just independent files, but
that might indeed vary.

Question is: When people put files with an order in there, are they
expecting C-locale ordering or their locale's ordering.

I just tried it out, the locale makes a difference in globbing.

	$ echo *
	fäo foa foo foö föo föö foz föz fzo fzö
	$ LC_ALL=C bash
	$ echo *
	foa foo foz foö fzo fzö fäo föo föz föö

One can set the locale to C in a regular session and then try it again:

	$ LC_ALL=C
	$ echo *
	foa foo foz foö fzo fzö fäo föo föz föö

So the locale (or collation) does influence the globbing, but we can
change that in the script.

So maybe we should put a LC_COLLATE=C in the top of the file? Although
that might have side effects …
-- 
http://martin-ueding.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20120726/4de9d939/attachment.pgp>


More information about the Bash-completion-devel mailing list