Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 470bdf2

Browse files
authored
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.
1 parent e198f37 commit 470bdf2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

historytailbash

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/sh
22

3+
# Add the following 2 lines to your ~/.bashrc file to tell bash to save your history
4+
# to the history file after each command rather than after shell exit
5+
#
6+
# shopt -s histappend
7+
# PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
8+
#
9+
310
#Ensure we have the quantity specified on the CLI
411
if [ -z "$2" ]; then ARG_ERR=ERR; fi
512
if [ -z "$1" ]; then ARG_ERR=ERR; fi

0 commit comments

Comments
 (0)