- cat <<EOF >>~/.bashrc
- # Avoid duplicates
- export 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
- export PROMPT_COMMAND="\${PROMPT_COMMAND:+\$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
- EOF
Heredocument to share hisroty of each shell with others sessions shells around..
Works with 1 last command of delay
you can type one only to 'commit'
ie command: aaaa