Answers for "to remember all commands typed in multiple terminal"

0

to remember all commands typed in multiple terminal

# Avoid duplicates
HISTCONTROL=ignoredups:erasedups
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend

# After each command, append to the history file and reread it
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
Posted by: Guest on September-02-2021

Code answers related to "to remember all commands typed in multiple terminal"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language