From b53a08c45a9b76cb23af372fdf5f737c1fee3e40 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 4 Sep 2016 15:33:17 -0400 Subject: [PATCH] added immediate history writes. thanks internets... --- scripts/core/launch_feisty_meow.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index fec11079..c130a00a 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -80,6 +80,15 @@ shopt -s checkwinsize ############## +# make history writes immediate to avoid losing history if bash is zapped. +echo $PROMPT_COMMAND | grep -q history +if [ $? -ne 0 ]; then + # we only change the prompt command if we think it hasn't already been done. + export PROMPT_COMMAND="history -a;$PROMPT_COMMAND" +fi + +############## + if [ -z "$LIGHTWEIGHT_INIT" ]; then # perform the bulkier parts of the initialization process. -- 2.34.1