CompuServe Messages

#Macaroni (shells)

    24-May-89 02:35:14
Fm: John Draper 76703,4322
To: Scott Ballantyne 70066,603
Scott, You are right of course, in that the shell should not pass judgement on the command line, since that woul ddestroy the universality of it. However, I still think there are ways around it that preserve the good points of shell expansion. Actually, the library expansion you mentioned might even be preferable for this. Just thinking off the top of my head… the shell passes arguments as is, and then in parsed form, indicating with each argument, what the position of the raw arg is in the command line. Obviously, in the 'rename' example, the second argument should never resolve to a real file name, and if it does, the rename program has the responsibility of reporting an error. Similarly, the 'rm' command, having received the raw argument, '*', could opt to put up an 'Are you sure?' before operating on any of the parsed arguments. The real advantage of external parsing is that of consistency. We only need to look at programs on the Amiga, even those supplied by CBM with the system, to see what happens when arguments are parsed solely by the program. -larry