Automatic wildcard expansion

AmigaOS users can make feature requests in this forum.

Automatic wildcard expansion

Postby chris » Sun Nov 30, 2014 2:09 am

Currently, unless I'm mistaken, if a program wants to support pattern-matching from the command line it's a manual process of:
* ParsePattern/NoCase
* MatchPattern/NoCase against each entry of a previously-obtained directory scan.

This is tedious and might be why we have to resort to SPAT much of the time to operate on multiple files.

I suggest an addition to ReadArgs:
/P - This switch means that wildcards will be expanded, so the application receives an array of filenames matching the pattern passed in (relative to the current directory if a full path was not provided). If no filesystem objects matched the pattern the first entry in the array will be NULL. When combined with /M the user will be able to specify multiple optionally wildcarded strings which will all be expanded into the same array.
Posts: 552
Joined: Sat Jun 18, 2011 12:05 pm

Re: Automatic wildcard expansion

Postby thomasrapp » Sun Nov 30, 2014 2:42 pm

Such an array could be *very* large.

I suggest to use MatchFirst/MatchNext instead which is meant for this kind of thing.
User avatar
Posts: 270
Joined: Sun Jun 19, 2011 12:22 am

Return to AmigaOS Feature Requests

Who is online

Users browsing this forum: No registered users and 3 guests