bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with pathname expansion


From: Greg Wooledge
Subject: Re: problem with pathname expansion
Date: Fri, 27 Dec 2013 07:41:03 -0500
User-agent: Mutt/1.4.2.3i

On Fri, Dec 27, 2013 at 07:14:39AM +0400, vollitwr . wrote:
> It is obvious that letters 'b'
> and 'B' are different for everybody in any locale

No, they're the same letter.  One's upper-case and one's lower-case.

> How is it possible to use sequence like aAbBcC... for the
> range patterns?!

When you have words in a dictionary, they're in alphabetical order,
yes?  But the case of the letters is not relevant.

...
bar
barb
Barbara
barn
barnacle
Barney
barometer
baron
...

Mixed-case locale ordering is how words are usually sorted by everyone
who isn't an old-school computer programmer.

When I type "ls" my files are sorted in a similar way:

$ ls
...
xclip-0.12.tar.gz
xengine_1.11.orig.tar.gz
XF86Config
Xf86.0.log
xlockmore-5.02-README
...

If you don't like this behavior, then you can set LC_COLLATE=C or
whatever.  This will change the ordering back to "all capital letters
come before all lower-case letters because of the arbitrary numerical
assignments of ASCII".

$ LC_COLLATE=C ls
...
XF86Config
Xf86.0.log
...
xclip-0.12.tar.gz
xengine_1.11.orig.tar.gz
xlockmore-5.02-README
...

Or, you can install the Bash 4.3 prerelease and use the new
globasciiranges option.  There's even a compile-time option to make that
the default.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]