Christ.
On some level, this is probably something your terminal emulator should handle, just as your web browser should handle a mess of 22 tabs, but I don't think we've really come up with good solutions there either. It's hard to implement features nobody's though of.