Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-12-17
01:44 • Closed ticket [654649ffff]: glob with -nocase switch? plus 7 other changes artifact: 47e900a0e4 user: hobbs
2002-12-16
15:34 • New ticket [654649ffff]. artifact: 8667dc6f5f user: nobody

glob with -nocase switch?

Closed / Wont Fix654649ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-12-16 15:34:31
would be nice if glob had a -nocase switch
so if you have the dirs 'TCL8.4' and 'Tcl8.3' and do a:
glob -nocase ./*tcl*

it will still match those dirs.
hobbsplain2002-12-17 01:44:51
Logged In: YES 
user_id=72656

Shorter example like the above can just be:

glob -nocomplain -directory . {*[Tt][cC][lL]*}

but more complex patterns should just get all the names and 
use string match or regexp for filtering afterwards.  glob is 
already a powerful command, but we should try not to bloat 
single commands too much.

That said, there is an API already for case insensitive glob 
matching, so it would be a very small patch.  Anyone want to 
support this?
Log in (anonymous is fine) to add a comment.