From mboxrd@z Thu Jan 1 00:00:00 1970 From: pnr@planet.nl (Paul Ruizendaal) Date: Wed, 6 Dec 2017 12:02:25 +0100 Subject: [TUHS] shell PS1/PS2 which survive cut-paste In-Reply-To: References: Message-ID: >> The choice of "# " and "> " interests me. Because roots prompt of >> "hash" has a side effect of making a cut-paste over it a comment in >> most shells. > > "#" as the root prompt predates # as the comment in the Bourne shell, > not to mention predating copy/paste entirely. (My understanding is that > the do-nothing command, ":" was used for comments. Talk about minimalist!) > > Same point for ">", since copy/paste didn't exist in the late 70s when > Bourne was doing the shell, it wasn't an issue. As early as V5 the (thompson) shell prompts were “#” and “%”, and “:” for a label. As the goto command exists in V4 (there is a man page for it), I would assume that those characters were used in V4 as well. So it would seem to go back to 1974. In the V7 (bourne) shell the default non-root prompt is “$”. Goto is dropped at this point. Don’t know when or where “>” was first used on Unix as a prompt character (on my boxes it still is “$”). Paul