View Issue Details

IDProjectCategoryView StatusLast Update
0000081tcshGeneralpublic2019-07-29 13:05
Reporteroldpink Assigned Tochristos  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.21.00 
Fixed in Version6.22.00 
Summary0000081: Filename expansion inside square brackets is apparently broken
DescriptionI have been running TCSH version 6.21.00 on my Slackware system since Patrick Volkderding made the new build of TCSH part of Slackware-current on May 10.
However, I ran into a really nasty issue with this new version of TCSH that breaks filename pattern matching within square brackets, specifically, I tried upgrading (via upgradepkg) several of my Slackware packages selectively by excluding some of the packages that I had downloaded so that I could install the excluded packages as additions instead of upgrading them.
I excluded the kernel packages, using the following command: upgradepkg [b-c,l-z]*.t?z
However, much to my dismay, it went ahead and upgraded the kernel-* packages anyway, deleting my three already installed kernel packages that I wanted to keep in place as secondary bootup and backups.
Sure enough, when I type "ls [b-c,l-z]*.t?z, it includes the kernel-* files in the list of files, too.
Obviously, this is not the way it should work, so I downloaded version 6.21.00 from source, then compiled it using the Slackware build script (called a SlackBuild) to see if reverting the previous kernel would correct the error, and Shazam! yes it works as it should, properly excluding the kernel-* files in my filespec.
I'm certain that this is a bug, and a very bad one at that, so I'll be using the previous version of TCSH for now, but I wanted to let you know about my problem with the current version so that maybe something could be done before someone unintentionally wipes out an entire file system or something else because of this bug.
Steps To ReproduceHere is the list of files I'm trying to exclude, with no other files in the directory where they are:
kernel-huge-4.19.44-x86_64-1.txz
kernel-source-4.19.44-noarch-1.txz
kernel-modules-4.19.44-x86_64-1.txz

Using Bash, I get the proper response with this command: ls [a-d,l-z]*
ls: cannot access '[a-d,l-z]*': No such file or directory

Using version 6.20.00 of TCSH: ls [a-d,l-z]*
/bin/ls: No match.

Using the buggy version 6.21.00 version of TCSH: ls [a-d,l-z]*
kernel-huge-4.19.44-x86_64-1.txz kernel-source-4.19.44-noarch-1.txz
kernel-modules-4.19.44-x86_64-1.txz

Clearly something is not right.
TagsNo tags attached.

Activities

oldpink

2019-05-17 14:04

reporter   ~0003246

I made a typo, and I can't find a way to edit my original bug report, so I'm writing my correction down here in the note box to explain that I downloaded the source and built version 6.20.00, NOT 6.21.00 to see if the bug went away by using the previous TCSH.
Sorry about my error.

christos

2019-07-29 13:05

manager   ~0003269

Fixed, thanks!

Issue History

Date Modified Username Field Change
2019-05-17 13:58 oldpink New Issue
2019-05-17 14:04 oldpink Note Added: 0003246
2019-07-29 13:04 christos Assigned To => christos
2019-07-29 13:04 christos Status new => assigned
2019-07-29 13:05 christos Status assigned => resolved
2019-07-29 13:05 christos Resolution open => fixed
2019-07-29 13:05 christos Fixed in Version => 6.22.00
2019-07-29 13:05 christos Note Added: 0003269