From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mod.civil.su.OZ.AU ([129.78.142.6]) by hawkwind.utcs.toronto.edu with SMTP id <2780>; Fri, 9 Jul 1993 02:01:11 -0400 Received: by mod.civil.su.oz.au id <28694>; Fri, 9 Jul 1993 15:09:51 +1000 From: John (Most modern computers would break if you stood on them) Mackin Date: Fri, 9 Jul 1993 00:54:51 -0400 To: The rc Mailing List Subject: A truly revolting feature Message-ID: <199307091454.931.rc.bakis@civil.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ I won't name the person whose idea this was since it isn't really his fault, and my intent isn't to hold _him_ up to ridicule. Rather it is to shed light into one of the darkest crannies I have yet seen in the lexical analyser in /bin/sh, so that we can all feel extra-glad that we've seen the light and changed to better shells. Many months ago, I told this man about rc and suggested that he should take a look at it. I showed him Duff's document. He went as far as building it and putting it in his machine's /usr/local/bin, and giving it a try. For some reason, he hasn't changed to rc, but he sent me mail at the time saying that he was impressed by the ability to mouse the whole line with the "; " prompt. I pointed out to him that he could do that under sh also by using the Pike prompt style (": ;"), and then never heard any more from him about it. The other day I was in his office and he proudly showed me what he'd come up with: the ability to mouse the whole line _even though PS1 had the standard value of "$ "_. He had put the following in $home/bin/ ^ '$': #!/bin/sh exec "$@" Much to my nausea, it turns out that sh is quite prepared to regard a bare $ sign as a plain old "word", and search the path for it if it stands in command position... Of course, this has to be a script and not a function, since sh's function names have to be "identifer"s. But, how horrendous can you get? Yeuch. OK, John.