|
|
|
|
|
by tryauuum
375 days ago
|
|
> command I run in one shell session is not immediately available as a history item in other concurrent shell sessions this can be solved in vanilla bash by adding these lines to .bashrc (be sure to remove other HIST* configs options from it) shopt -s histappend
export HISTSIZE=100000
export HISTFILESIZE=100000
export HISTTIMEFORMAT="%F %T "
export HISTCONTROL=ignoredups:erasedups
export PROMPT_COMMAND="history -a;history -c;history -r;$PROMPT_COMMAND"
additionally, you need to restart or close all the bash sessions to be sure no copy of bash with old settings exists |
|
Infinite history instead of a large limit:
Also ignore commands starting with a space: Enable history substitution to verify commands before running them: Write commands to history files before running the commands instead of after the commands finish: Or if you already have a DEBUG trap: