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

Michael Kjörling michael at kjorling.se
Tue Aug 7 18:02:56 AEST 2018


On 7 Aug 2018 06:54 +0000, from michael at kjorling.se (Michael Kjörling):
> the shell will do The Right Thing (tm)

I suspect I must stand corrected on this. Turns out that at least GNU
bash 4.4.12(1) seems to not like a `;` at the beginning of the command
line.

    $ /bin/bash --version | head -n1
    GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
    $ /bin/bash
    $ ; true
    bash: syntax error near unexpected token `;'
    $ echo $?
    2
    $

Hopefully other shells are more sane.

-- 
Michael Kjörling • https://michael.kjorling.semichael at kjorling.se
  “The most dangerous thought that you can have as a creative person
              is to think you know what you’re doing.” (Bret Victor)



More information about the TUHS mailing list