git.annexia.org
/
techtalk-pse.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
daacc22f660edad43dacf630ee03b7348eb11209
[techtalk-pse.git]
/
examples
/
simple
/
functions
1
# -*- shell-script -*-
2
3
# Place any local environment variables required in 'local'.
4
if [ -f local ]; then source local; fi
5
6
export PS1="$ "
7
8
export HISTFILE=$talkdir/history
9
10
rm -f $HISTFILE
11
touch $HISTFILE
12
13
add_history ()
14
{
15
echo "$@" >> $HISTFILE
16
}
17
18
terminal ()
19
{
20
# Make $HISTFILE unwritable so the shell won't update it
21
# when it exits.
22
chmod -w $HISTFILE
23
24
# Execute a shell.
25
bash --norc "$@"
26
}