git.annexia.org
/
techtalk-pse.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Version 1.2.0 (stable).
[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
}