Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!ukma!rutgers!tut.cis.ohio-state.edu!osu-cis!killer!texbell!uhnix1!sugar!peter From: peter@sugar.uu.net (Peter da Silva) Newsgroups: comp.sys.amiga Subject: Re: aliases and RUN Message-ID: <2975@sugar.uu.net> Date: 9 Nov 88 13:06:13 GMT References: <5230@louie.udel.EDU> <483@boing.UUCP> Organization: Sugar Land Unix - Houston, TX Lines: 45 In article <483@boing.UUCP>, dale@boing.UUCP (Dale Luck) writes: [Rewrite the CLI...] I'd say... dump the CLI completely. Switch to a workbench environment. Now, you can still have shells and command line interpreters, but make them spawn programs in a workbench environment. How? Well, when you kick off a WB command, WBStartup->sm_Arglist[0].wa_Lock contains the directory the executable was in when you kicked it off. Also, WBStartup->sm_Arglist[0].wa_Name contains its name. Well, let's say you made WBStartup->sm_Arglist[0] a special case: wa_Lock == current directory. wa_Name == command line with fully qualified command name. What would this break? New programs would still work correctly from the WB, since wa_Lock is a reasonable definition of the current directory and wa_Name is the command name when run from that directory. If sm_NumArgs is 1, then you can use the command line (feed it to existing _main()). If it's >1, then you know you're in a workbench-only environment and you parse sm_Arglist normally. Existing WB programs can still be executed by just typing in their name. The wa_Lock will be wrong, but since wa_Name is a full path name they'll still be able to open their .info file. Existing CLI-only programs will crash. This is the biggy. Anyone have any ideas? There's no easy way to pass stdin, stdout, stderr, and stdcmd. Anyone have any ideas? Without breaking too many programs, please... Maybe make sm_NumArgs==0 a special case indicating that sm_ArgList is an a new format (current directory, standard locks, argv...?)? What are the advantages? The big one, of course, is we can kiss struct CommandLineInterface goodbye. -- Peter da Silva `-_-' peter@sugar.uu.net Have you hugged U your wolf today? Disclaimer: My typos are my own damn business.