Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Wildcard types Message-ID: <15940@cbmvax.commodore.com> Date: 18 Nov 90 23:00:26 GMT References: <15517@cbmvax.commodore.com> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 33 In article ggk@tirith.UUCP (Gregory Kritsch) writes: >>In article <1990Nov16.171451.5668@gtisqr.uucp> rick@gtisqr.uucp (Hendrik Groeneveld) writes: > >>> expansion is the shell's job. If I don't want somthing expanded >I can't resist doing this, but here's a totally bonkers thought for you. >You know how there are various getarg()/getopt() type functions around >for parsing argc/argv for a program? Well, what if the template to that >was stored in a special HUNK near the beginning of the load module. > >A shell could then get a command line from the user, strip out the first >word (command name), load the template, parse the arguments acordingly >(including filename expansion for specified multiple file arguments), >and pass the results of the parsing to the program after it is loaded. Or, you could put the template in the program, and one of the first things the program does is call the Dos routine that parses arguments, and call the Dos routine that expands wildcards. Suprise, guess what, these calls are in the OS and the new C commands use them. Having the expansion done in the program does make the system somewhat more flexible, and reduces the amount of quoting that users have to deal with. It's a tradeoff, of course, and there are thigns to be said for both sides, but I think that when non-expert user interface issues are taken into account the current system is best. BTW, the hunk idea is right out, due to loadfile compatibility issues. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup Thus spake the Master Ninjei: "If your application does not run correctly, do not blame the operating system." (From "The Zen of Programming") ;-)