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