Include more labels on loop vs nbd diagram.
[libguestfs-talks.git] / 2010 / functions
1 # -*- shell-script -*-
2
3 # Place any local environment variables required in 'local', eg for
4 # things like LIBGUESTFS_QEMU wrappers.
5 if [ -f local ]; then source local; fi
6
7 export PS1='\$ '
8 export LS_COLORS="$LS_COLORS:*.iso=01;31:*.img=01;31"
9
10 export LIBVIRT_DEFAULT_URI='qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock-ro'
11
12 export HISTFILE=$talkdir/history
13
14 rm -f $HISTFILE
15 touch $HISTFILE
16
17 add_history ()
18 {
19     echo "$@" >> $HISTFILE
20 }
21
22 terminal ()
23 {
24     chmod -w $HISTFILE
25     exec \
26         gnome-terminal \
27         --geometry=+140+64 \
28         --window-with-profile=Large \
29         --hide-menubar \
30         --disable-factory \
31         -e '/bin/bash --norc' \
32         "$@"
33 }
34
35 ls ()
36 {
37     /bin/ls --color=auto "$@"
38 }
39 export -f ls
40
41 ll ()
42 {
43     ls -lF "$@"
44 }
45 export -f ll