colored bash sessions, each its own history
I like to run multiple xterms with a bash session in each (who doesn't?) Usually these are color-coded, e.g. -bg "#880000" for VNC sessions, a dark violet for python programming experiments, etc. These are run from a script or desktop menu, and always the same dozen colors. I create and destroy these xterms all the time. No problem so far.
I rely heavily on the up arrow key to recall past commands. But eash bash session will recall the history of some random previous bash session. What i would like: If i create a new dark violet xterm, the bash shell running in that should recall the history from the previous time i ran bash in a dark violet xterm. Meanwhile, a brown xterm's bash will recall the history of the previous time i ran bash in a brown xterm.
If there wasn't one, is okay to come up blank. If there are multiple past xterms of a certain color, i don't care if it gets confused. This is all for a convenience, not life or death.
Is this possible with some wickedly clever PS1 or .bashrc incantation, or some X windows hocus pocus? Perhaps a different xterm (i actually use rxvt) or something?
|