Bug 59493

Summary: filename expansion [A-z] broken
Product: [Retired] Red Hat Linux Reporter: Need Real Name <swood>
Component: tcshAssignee: Miloslav Trmač <mitr>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-23 15:53:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.