Bug 59493 - filename expansion [A-z] broken
Summary: filename expansion [A-z] broken
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tcsh
Version: 7.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-08 22:23 UTC by Need Real Name
Modified: 2007-04-18 16:40 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-08-23 15:53:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-02-08 22:23:44 UTC
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

but 

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

but 

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 21:15:26 UTC
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 15:53:24 UTC
(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.