glob matching with range in brackets doesn't work properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tcsh (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
% mkdir tst
% cd tst
% touch a00.x a01.x a02.x a03.x a04.x a05.x
% ls a0[1-4].x
a00.x a01.x a02.x a03.x a04.x
Correct output (seen from my OpenSUSE system which is running tcsh 6.20.00-4.15.1) is:
a01.x a02.x a03.x a04.x
In other words, "a00.x" shouldn't match the glob expression "a0[1-4].x". Last I checked, 0 isn't located anywhere between 1 and 4, though I guess I could be wrong. Interestingly, matching works properly on Ubuntu's 6.21 tcsh if I don't use a range:
% ls a0[1234].x
a01.x a02.x a03.x a04.x
So it seems to be specifically a problem with ranges and not with brackets themselves.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: tcsh 6.21.00-1.1
ProcVersionSign
Uname: Linux 5.19.0-45-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
CurrentDesktop: KDE
Date: Fri Mar 1 09:30:15 2024
SourcePackage: tcsh
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
mtime.conffile.