From mboxrd@z Thu Jan 1 00:00:00 1970 From: lyndon@orthanc.ca (Lyndon Nerenberg) Date: Tue, 18 Apr 2017 17:50:05 -0700 Subject: [TUHS] Bourne shell and comments In-Reply-To: <020a01d2b885$94bd49c0$be37dd40$@ronnatalie.com> References: <20170418204834.GA22198@minnie.tuhs.org> <020a01d2b885$94bd49c0$be37dd40$@ronnatalie.com> Message-ID: > Ron said: > I still remember using : for a comment in the V6 shell. Was also the label > for goto. What's cool about ':' vs. '#' is: -----8<-----8<-----8<-----8<-----8<-----8<----- function cd { command cd "$@" && setprompt } function setprompt { PS1=": "`id -un`@`hostname|sed 's;\..*$;;'`:'${PWD}; '; export PS1 } setprompt -----8<-----8<-----8<-----8<-----8<-----8<----- 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. --lyndon