@Aslak3
Quote:
Doing:
prog *.c
You will always get the globed arguments in your main function. Your program knows not wether the user typed in each argument or globed with the wild card. It should infact never have to care. This is a good part of unix design and sets it apart from the IMO crapper way amigaos leaves this to the program being run.
What if the program being run *does* care? What if I have a command-line crossword solver that supports AmigaDOS-style pattern-matching (bear with me)?
crossolve a?i?a
Could show all words in its dictionary matching that AmigaDOS pattern.
UNIX-style the program would presumably just get a list of filenames matching that pattern, unless the user bothered to escape each wildcard?
Having said that, I can see this being very useful. It's something that could be added to ReadArgs, with /P specifying that the program wants a parsed array of files, rather than the argument verbatim. That would take the pattern parsing and directory-scanning nonsense out of the application and into the OS, where it should be. It would also finally get rid of having to use spat all the time because nobody can be bothered to implement pattern-matching.
Anybody able to raise that as an OS4 feature request?