Bug 59493 - filename expansion [A-z] broken
filename expansion [A-z] broken
Product: Red Hat Linux
Classification: Retired
Component: tcsh (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Miloslav Trmač
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-02-08 17:23 EST by Need Real Name
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-23 11:53:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-02-08 17:23:44 EST
Description of Problem:
Filename expansion in tcsh in RH7.2 seems to be broken in the following
manner: expansion by a range that begins with an element of the upper
case alphabet and ends with an element of the lower case alphabet fails
(e.g., ls [A-z]).

Version-Release number of selected component (if applicable):
RH7.2  libraries 2.4.n

How Reproducible:
mkdir x
cd x
touch A B Z a b z
ls [A-z]

yields: A b B z


ls [a-Z]

yields: ls: No match.

Steps to Reproduce:
1. mkdir x
2. cd x
3. touch A B Z a b z
4. ls [A-a]

Actual Results:
4. ls [A-z] 
yields: A b B z


5. ls [a-Z]
yields: ls: No match.

Expected Results:
I would expect to see all six files listed in the union of the two outputs.

Additional Information:
A clue can be inferred from the ordering 'b B' in the first example; my
surmise is that two different sort sequences are used, in some places
treating case as major and letter as minor, and in others treating
letter as major and case as minor.  No matter what the cause, this is a
change from RH6 and earlier (or should I say from 2.2.n and earlier),
and causes previously tested commands and scripts to fail.
LC_COLLATE and LC_CTYPE were quite standard (US English, I believe);
shell was /bin/tcsh
Comment 1 Need Real Name 2002-02-12 16:15:26 EST
An even simpler, more graphic demonstration:

mkdir x
cd x
touch A a
ls [A-a]
ls [a-A]

Both invocations of ls return: No match,
but (at least) one should return: A a
Comment 2 Miloslav Trmač 2004-08-23 11:53:24 EDT
(reproducible with en_US locale).

Fixed in tcsh-6.13-2, which should be in rawhide soon.

Note You need to log in before you can comment on or make changes to this bug.