Skip to content

Commit

Permalink
Added instructions for setting up the **bash** shell
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mblack88 authored Sep 5, 2018
1 parent e198f37 commit 470bdf2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions historytailbash
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 470bdf2

Please sign in to comment.