summaryrefslogtreecommitdiffhomepage
path: root/tests/linux/i-prompt.exp
blob: 406e9c7d6b7206c619c3961585556e5a0154d046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ 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]