I constantly need to close and re-open programs. To do this I press Control+C > Up Arrow > Enter. However, I have more than one program and need to run different commands for these programs. If I run another command in a new terminal the history changes for the original terminal and the up arrow is no longer the last command. I'm forever accidentally running random commands in the terminal.
I have tried Control+R to search history and
!! but I do this too frequently and they are too slow.
The ideal situation would be that history for a terminal did not change once the terminal was opened. Even better if that can be done only for arrow keys.
The closest I have gotten is a delay on updating the history.
Any suggestions would be greatly appreciated.