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

Re: 'LC_COLLATE=de ls [A-Z]*' expands to 'every file' including lowercase



> On Jul 8, 10:36am, Zoltan Hidvegi wrote:
> } Subject: Re: 'LC_COLLATE=de ls [A-Z]*' expands to 'every file' including l
> }
> } > Which standard, specifically?
> } 
> } POSIX 1003.2 and X Open Single Unix Spcification Version 2.
> 
> Well, yes, but I meant which volume.  Commands and Utilities?

Base Definitions -> Regular Expressions.  Commands and Utilities ->
Shell Command Language refers to regular expressions describing range
patterns.  Which means that you should not be surprised when sed and
grep start matching lower case letters with [A-Z].  And if you ever
port zsh to some EBCDIC machine, you'd probably want to use the
collate order.  But it looks like the GNU regexp library does not use
the collate order for ranges, neither does bash, actually, I haven't
found anything which uses the collate order for ranges, so it is
probably OK to make zsh non-conforming here.

Zoli



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