I want infinite history, because I type a lot of commands I can forget at the spot and would like to have it stored somewhere as a reference. But by just setting
HISTFILESIZE it does not work good because IIRC the commands are stored only when terminal window is closed, and tends to overwrite each other. So my current setting is this:
export HISTCONTROL=ignoredups:erasedups # no duplicate entries export HISTSIZE=100000 # big big history export HISTFILESIZE=100000 # big big history shopt -s histappend # append to history, don't overwrite it
however this has one drawback. When using multi-pane "terminal app" like terminator, the history order for each pane is incorrect, as IIUC, then I won't lose any command, but history is central, thus separate terminals cannot say what was their last command.
I need not to stick to bash history management, I have no issue with anything else which would solve this, ie: no lost commands, each terminal is capable to find any command while still being able to scroll back in time in order this specific terminal invoked the commands. If you have experience with McFly or anything else which would work, please advise. However I'd rather not like to steer away from bash, because it's more commonly used, and I need to be able to share scripts with majority or people.
Motivation: imagine one terminator app, splitted into several virtual terminals while doing testing. I want to invoke some commands it "its" specific pane for clarity. It would be speedup for me, if I could be able just hit up-enter to rerun previous command, which I cannot, because actions from other panes changes the order.