git.annexia.org
/
techtalk-pse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a new type '*.term' for running VTE terminal commands.
[techtalk-pse.git]
/
examples
/
simple
/
functions
diff --git
a/examples/simple/functions
b/examples/simple/functions
index
03d70cf
..
daacc22
100644
(file)
--- a/
examples/simple/functions
+++ b/
examples/simple/functions
@@
-1,9
+1,14
@@
# -*- shell-script -*-
# -*- shell-script -*-
+# Place any local environment variables required in 'local'.
+if [ -f local ]; then source local; fi
+
export PS1="$ "
export PS1="$ "
-export HISTFILE=/tmp/history
+
+export HISTFILE=$talkdir/history
rm -f $HISTFILE
rm -f $HISTFILE
+touch $HISTFILE
add_history ()
{
add_history ()
{
@@
-12,11
+17,10
@@
add_history ()
terminal ()
{
terminal ()
{
- exec \
- gnome-terminal \
- --window \
- --geometry=+100+100 \
- --hide-menubar \
- -e '/bin/bash --norc' \
- "$@"
+ # Make $HISTFILE unwritable so the shell won't update it
+ # when it exits.
+ chmod -w $HISTFILE
+
+ # Execute a shell.
+ bash --norc "$@"
}
}