From 470bdf2ae006a78a6233786cdf63e60fccc7c845 Mon Sep 17 00:00:00 2001 From: Matt Blackburn Date: Wed, 5 Sep 2018 07:38:08 -0400 Subject: [PATCH] Added instructions for setting up the **bash** shell Discovered that the **default** install of the bash shell on Windows did not work with this script. Adding the lines indicated in the change comment lines to the ~/.bashrc file instructs **bash** to save every command to the ~/.bash_history file when they are executed, the default behavior is to save the instructions to the history file only on exit of the shell. --- historytailbash | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/historytailbash b/historytailbash index 74c71b4..4fa43cc 100755 --- a/historytailbash +++ b/historytailbash @@ -1,5 +1,12 @@ #!/bin/sh +# Add the following 2 lines to your ~/.bashrc file to tell bash to save your history +# to the history file after each command rather than after shell exit +# +# shopt -s histappend +# PROMPT_COMMAND="history -a;$PROMPT_COMMAND" +# + #Ensure we have the quantity specified on the CLI if [ -z "$2" ]; then ARG_ERR=ERR; fi if [ -z "$1" ]; then ARG_ERR=ERR; fi