[TUHS] Origins of shell prompt suffixes % $ > #

George Michaelson ggm at algebras.org
Tue Aug 7 11:10:09 AEST 2018


Off topic to one side:

I was told, but cannot recall by whom, that the csh decision to use %
when the bourne shell had $ was to make it clear which syntax was
expected by the user. tcsh inherited from csh. Bash/Zsh/Ash/Ksh
inherited from sh.

Obviously that is outside the strict terms of the question and lies in
hands, not this lists main focus.

-G

On Tue, Aug 7, 2018 at 7:33 AM, Henry Bent <henry.r.bent at gmail.com> wrote:
> On 6 August 2018 at 17:16, <ron at ronnatalie.com> wrote:
>>
>> The early shells (Thompson, Mashey)  used "% " for regular user (and # for
>> root).   The Thompson shell didn't have a setable prompt.
>> The Bourne shell (V7) had setable PS1 (start of command) and PS2
>> (continuation prompts) and set the to "$ " and "> " respectively.    Again #
>> was used for root
>
>
> Okay, but why did Bourne switch from "%" to "$"?  Was it to inform the user
> that they were using the new shell as opposed to the old one, or was there
> some other reasoning behind the switch?
>
> -Henry



More information about the TUHS mailing list