OILS / spec / ysh-interactive.test.sh View on Github | oilshell.org

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