I got tired of losing the shell history for most of my tabs in ptyxis1 when it exits so I threw this together: https://gist.github.com/dbrand666/0b54c5edc659b69bf8dd7134277d9445. It should be pretty much self-documenting. There’s nothing to configure. Just drop it in ~/.bashrc.d/ptyxis-history and it’ll handle any new shell tab.
What it does
The idea starts with creating a separate history file for each tab. They’re stored in ~/.history, which is created if it doesn’t already exist. The history files are numeric – the process ID of the shell.
When a new level 0 bash is launched, it looks for an orphaned history file in there and adopts it. If there are none left, it creates a new one.
I’ve only been using it a couple of days but it seems to work.
- the default Gnome Terminal these day, at least in Fedora ↩︎