Make titles larger red background, white text.
[libguestfs-talks.git] / 2019-kvm-forum / functions
index 7baaed0..94948e2 100644 (file)
@@ -29,7 +29,8 @@ keys=(- OP OQ OR OS '[15~' '[17~' '[18~' '[19~' '[20~' '[21~')
 remember ()
 {
     echo "$@" >> $HISTFILE
-    echo \"\\e${keys[$fnum]}\":\"\\C-k \\C-u"$@"\" >> $talkdir/bindings
+    echo "$@" | sed -e 's/"/\\"/g; s/$/"/' \
+        -e 's/^/"\\e'"${keys[$fnum]}"'":"\\C-k \\C-u/' >> $talkdir/bindings
     ((fnum++))
 }
 
@@ -38,3 +39,8 @@ terminal ()
     chmod -w $HISTFILE
     /bin/bash --rcfile $talkdir/bashrc "$@"
 }
+
+banner ()
+{
+    printf "%s   %s   %s\\n" $'\e[1;37;41m' "$1" $'\e[0m'
+}