[TUHS] Bourne shell and comments

Andreas Kusalananda Kähäri andreas.kahari at icm.uu.se
Thu Apr 20 02:59:06 AEST 2017


On Wed, Apr 19, 2017 at 10:31:53AM -0600, Grant Taylor wrote:
> On 04/18/2017 06:50 PM, Lyndon Nerenberg wrote:
> > What's cool about ':' vs. '#' is:
> ...
> > Stick that in your .env and you get a snarf-and-barf'able shell
> > prompt that evals as a noop.  Blatantly ripped off from plan9port
> > IIRC.  I run this across all manner of *BSD and Solaris and Linux and
> > it just works.
> 
> I think you're effectively doing the same thing that I'm doing by having my
> prompt start with '#', thus turning copy & paste ""errors into pasting
> comments.  Just a difference of a '#' comment character and a ':' label.

Ah, thanks for explaining "snarf-and-barf"... I did a fast forward at
that point.  Sorry Lyndon...

Is this a reason why "#" was chosen as the root prompt, by the way?
POSIX mentions that "a sufficiently powerful user should be reminded of
that power by having an alternate prompt" but says little else...



> 
> I see little difference between ':' and '#' in this case.
> 
> Please help me understand if I'm wrong.
> 
> 
> 
> -- 
> Grant. . . .
> unix || die
> 





More information about the TUHS mailing list