Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!wuarchive!texbell!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: Wildcards, and argument parsing. Re: SKsh completion bug. Message-ID: <5374@sugar.hackercorp.com> Date: 11 Mar 90 05:06:33 GMT References: <1221@lpami.wimsey.bc.ca> Reply-To: peter@sugar.hackercorp.com (Peter da Silva) Organization: Sugar Land Unix - Houston Lines: 27 > Wonderful! Looking forward to it. Will you include the option to alow wildcard > matching against arbitrary data? I can package the internal routines conveniently for this. They don't yet exist, so that point's moot. > What I mean is, could I send argv[1] for > expansion against the contents of a directory, and then send argv[2] for > expansion against the expanded argv[1]? Parseargs works by extracting strings from the argument list and sending them to the appropriate routine. For example, if you have defined that "File" or '-f' is a Filename, then the associated string (from the argument, in UNIX style parsing, or the following argument, in Amiga style parsing) gets sent to a routine (yet to be written) calls argFile. in UNIX this will be the same as the String routine, argStr. In Amiga this will do either UNIX or Amiga wildcards and return a list of matching file names. So, define your argFile2 routine to do some preprocessing and call argFile and everyhing automagically works the way you want... Grab the code and check it out. -- _--_|\ Peter da Silva . / \ \_.--._/ I haven't lost my mind, it's backed up on tape somewhere! v "Have you hugged your wolf today?" `-_-'