GNOME Bugzilla – Bug 570788
Closing a tab does not save shell history
Last modified: 2009-08-17 12:43:31 UTC
Please describe the problem: When I close a tab by clicking on the close button on the tab (or using Ctrl-Maj-W), the current shell's history is not saved. This does not happen when using ctrl-D to close current tab, nor if you close a window using the close window button. Even if there are multiple tabs present when closing the window and you answer "Close all tabs" to the popup, the behaviour is normal and all tabs have their history saved. So it only happens when I specifically close a tab using the small 'X' icon on the tab, or Ctrl-Maj-W to close it. Steps to reproduce: 1. Start Gnome terminal 2. open a new tab (so that you now have two tabs) 3. type a command in one of the tab, then close just the tab in which you typed the command by clicking on the close tab icon or press Ctrl-Maj-W Actual results: The command you just typed is not in your history Expected results: The command should have been saved Does this happen every time? Yep Other information:
I've discovered today that in the end, it did actually save my history. So I ran a quick test: I first verified that I had no bash running using gnome-system-monitor, started 3 gnome terminal tabs, closed one using ctrl-maj-W, and, lo and behold, I still had 3 bash terminals running, instead of 2. If I closed all the remaining tabs, then all the running bash shells disappear at once. So, the problem is that the shell is not killed when the associated tab is closed.
That would be bug 509866 then. *** This bug has been marked as a duplicate of bug 509866 ***