| My screen respects the current working directory for new sessions. My history is configured to write at every prompt redraw and to don't miss commands. With vanilla history and prompt command settings, history will be separated. But as this is a common problem, and not only with screen, also with multiple xterms and IDE's shells, and... also is a problem that history may miss lines by default... And as it's a common problem, there are settings to fix that, configure the history merge strategy to your taste and do not miss history lines, because you did close a xterm, or you did open a new screen sessions. Curiously, those settings are even documented upstream. Session variables? I expect the ones that could be loaded by login executing bash -l... If I did export something after that, then maybe I simply need to export it again in a new session, but really in 20 years never was in this situation I think... (do not wait to a command, continue with other commands, and need a environment variable not initialized by default between both sessions....). If I was in that situation... was so easy to fix that I don't even remember. Which one to close? the one I prefer randomly, probably by focus, or probably the highest screen id. As history is merged, I can close any or even both. |