Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: globbing bug, 3.0.6



Chmouel Boudjnah <chmouel@xxxxxxxxxxxxxxxx> writes:

> teg@xxxxxxxxxx (Trond Eivind Glomsrød) writes:
> 
> > hoser% rpm -q zsh
> > zsh-3.0.7-4
> > hoser% echo $ZSH_VERSION 
> > 3.0.7
> > hoser% cat /etc/redhat-release 
> > Red Hat Linux release 6.2 (Zoot)
> > hoser% ls 
> > AA  AC	AE  BB	BD  CA	CC  CE	ab  ad	ba  bc	be  cb	cd  da	dc  de
> > AB  AD	BA  BC	BE  CB	CD  aa	ac  ae	bb  bd	ca  cc	ce  db	dd
> > hoser% ls [A-C]*
> > AA  AC	AE  BB	BD  CA	CC  CE	ab  ad	ba  bc	be
> > AB  AD	BA  BC	BE  CB	CD  aa	ac  ae	bb  bd
> > hoser%
> 
> it's the POSIX standard behavior when locale setting is set.

Yes. http://wwwold.dkuug.dk/jtc1/sc22/wg20/docs/n634.txt:

************************************************************************
(1)     Once special characters (punctuation) have been removed
        from original strings, the ordering is determined by
        scanning forward (left to right) [disregarding case and
        diacriticals].
************************************************************************

And that's horribly broken IMHO. At least, I think it's broken in
shell expansion (translates to: "it's not what I'm used to, it's
different in different locales (POSIX vs. the rest, including en_US),
it makes deleting just uppercase filenames in a range hard")


-- 
Trond Eivind Glomsrød
Red Hat, Inc.



Messages sorted by: Reverse Date, Date, Thread, Author