I often open lots and lots of Terminals [Right now I have 7 open on this workspace] and I often search history
with grep
to find a command I've just written recently, but I don't want to hunt down the terminal and then scroll up and hunt for it more, etc.. Sometimes my terminals close without 'exit,' and everything I've written is lost [Sometimes I've needed something I'd written in a terminal that was killed].
So is there a way to make it so each terminal writes to .bash_history immediately? or at least once a minute, or something like that?
control-r
to reverse-search in the command history of one bash. More convenient thanhistory | grep
unless you need a regex.