1 ## our_shell: ysh
2
3 #### yshrc
4 cat >$TMP/yshrc <<EOF
5 proc f {
6 if ('foo') {
7 echo yshrc
8 }
9 }
10 f
11 EOF
12 $SH --rcfile $TMP/yshrc -i -c 'echo hello'
13 ## STDOUT:
14 yshrc
15 hello
16 ## END
17
18 #### YSH_HISTFILE
19
20 export YSH_HISTFILE=myhist
21 rm -f myhist
22
23 echo 'echo 42
24 echo 43
25 echo 44' | $SH --norc -i
26
27 cat myhist
28
29 ## STDOUT:
30 42
31 43
32 44
33 ^D
34 echo 42
35 echo 43
36 echo 44
37 ## END