Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!jade!eris!mwm From: mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) Newsgroups: comp.sys.amiga Subject: Re: Pattern Matching & documentation Message-ID: <1805@jade.BERKELEY.EDU> Date: Tue, 2-Dec-86 20:33:51 EST Article-I.D.: jade.1805 Posted: Tue Dec 2 20:33:51 1986 Date-Received: Wed, 3-Dec-86 09:22:35 EST References: <954@blia.BLI.COM> <1731@jade.BERKELEY.EDU> <3237@curly.ucla-cs.UCLA.EDU> Sender: usenet@jade.BERKELEY.EDU Reply-To: mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) Organization: Missionaria Phonibalonica Lines: 47 In article <3237@curly.ucla-cs.UCLA.EDU> ucla-cs!cepu!ucla-an!remsit!stb!michael@ihnp4.UUCP cc1@LOCUS.UCLA.EDU (Michael Gersten) writes: >>For those who don't think per-argument pattern matching is a win, >>consider "finger *" and "finger *@*.berkeley.edu". > >Ok. Whats wrong with finger \*@\*.berkeley.edu or >finger "*@*.berkeley.edu" or >set noglob >finger *@*.berkeley.edu >unset noglob >? Because none of those do what the command ought to do - run a finger on all the *users* in the apropriate domain. All you've done is turned off the pattern matching, not made it work reasonably well. Worse yet, part of your turning of methods won't work if finger happens to be a shell script. Since it's not uncommon to have shell scripts that invoke other shell scripts, this can get to be a major pain in the ass. Why should I have to know how many levels of shell script are involved in a command when I run it? >Pattern matching on all commands is better as then every command has it >by default. Try doing a join on the result of running disksalv. Try doing >a usercommand *. Try doing a, well, you get the idea. Only the supplied >BCPL commands assume that they only have one file name, and that because >the supplied CLI won't expand wildcards. I've asked C-A to put multiple >filename support in, but I don't think they will. I certainly hope not. It would be better if they fixed the library mechanism (the linkers, maybe?) so you could invoke routines in shared libraries without doing an explicit "openlibrary", then providing the pattern-matching code in a library. They should also provide hooks so you can pattern-match against things other than file names. Then the "user interface design philosophy" should encourage people to expand filenames against the file system, device names against devices (hmm - never tried that. It may work.), font names against fonts, command names againts file in PATH, process names/id's against etc. All of which niceness is impossible/painfull if the shell is expanding names for you. Oh, yeah - many of the supplied BCPL commands work quite well with patterns and multiple file names. I run things against #? quite a bit (search, delete, copy being the most notable ones). Also, there are quite a few PD C programs that only swallow one argument. In any case do you (as a user) really care if the command or the shell does it? If so, why?