3 ms·
> They do that by setting different bash history files for each tab etc. I wonder what happens when you close all the tabs, and then open a new one. Are all th
by severino 3y ago
> They do that by setting different bash history files for each tab etc.
I wonder what happens when you close all the tabs, and then open a new one. Are all the tabs history merged back into a "general" history file when you close them, so you will get access to its commands in new ones?
- livrem 3y agoI set HISTFILE=~/.bash_history_$TMUX_PANE (when that variable is set). A bit kludgy, but works good enough for me.
- severino 3y agoYes, but if one process is writing its history to ~/.bash_history_1, and some time later you spawn a new shell whose history file points to ~/.bash_history_2, you won't have the commands from the previous session available, right?
- livrem 3y agoCorrect, but most of the time I use the same set of panes, created at startup, so the commands are in the history where I need them. And when they are not I grep in ~/.bash_history_*.