Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!ucsd!ogccse!schaefer From: schaefer@ogccse.ogc.edu (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: Annoying misfeature? Message-ID: <4921@ogccse.ogc.edu> Date: 29 Sep 89 19:31:43 GMT References: <3166@ur-cc.UUCP> <42.filbo@gorn.santa-cruz.ca.us> Reply-To: schaefer@ogccse.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 39 In article <42.filbo@gorn.santa-cruz.ca.us> filbo@gorn.santa-cruz.ca.us (Bela Lubkin) writes: } In article <3166@ur-cc.UUCP> Mark Sirota writes: } >All right, let's get philosophical here. Some of us, perhaps many of us, no } >longer give a damn about UCB Mail, and would happily get rid of these } >braindead behaviors for backwards compatibility. I want a mailer that works } >right, not one that works similarly to another braindead mailer. } } Kludge solution: after all parsing, if it turns out NOT to be an internal } command (build-in or cmd), go back and reparse it with break-at-digit turned } off. Or just keep a flag whether a break-at-digit was done during parse; } when it's determined to be an external command, shove together the first two } words if that flag is set. The problem with that is coming up with a definition of "after parsing". Presently, builtin lookup is not done until after cmd (alias) lookup and expansion; word splitting is of necessity done before cmd lookup. Even supposing we are willing to sacrifice efficiency to add an extra builtin lookup somewhere, there is still the possibility that cmds/builtins are a prefix of some external command, so the wrong decision would be made. What is needed is a way to look up external commands, but that is even more inefficient and prone to wrong decisions than an extra internal lookup. So suppose we wait until after cmd expansion,and THEN it turns out not to be a builtin. Is it safe to "shove together the first two words"? Well, maybe, but only if cmd expansion didn't change anything ... and with the possibility of a cmd expanding recursively, and/or expanding to an external command, that's a difficult question. It isn't necessarily impossible to keep track of all the variations, but it certainly doesn't seem like the best way to handle things. So it seems the choice is the one Mark originally implied: either do word splitting at message numbers/metachars, or don't. -- Bart Schaefer "Oooh, ick!" -- Penfold CSNET / Internet schaefer@cse.ogc.edu UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer