$ PS1='[\W:$?] ' [here:0] false [here:1] PS1='\w> ' ~> mkdir d && cd d ~/d> PS1='$(echo cmd)-$((1+2))> ' cmd-3> echo "two more> lines" two lines cmd-3> PS1='${nosuch?bad} ' SHELL: nosuch: bad ${nosuch?bad} echo survived survived SHELL: nosuch: bad ${nosuch?bad} PS1='\[\W\]: ' d: echo markers markers d: PS1='$ ' $ set -o ignoreeof $ SHELL: use "exit" to leave the shell $ set +o ignoreeof $ echo $- | grep -c i 1 $ exit [status 0]