Skip to main content
replaced http://apple.stackexchange.com/ with https://apple.stackexchange.com/
Source Link

There seems to be one case where disabling NSQuitAlwaysKeepsWindows does not work: When the Terminal is killed by killall Terminal, and probably also when it crashes or when it is forced quit.

I use killall Terminal regularly, but when the resume kicks in, it messes up my bash history. Basically, commands from the session after the resume will not be saved. Normal saving behaviour is only restored after I quit and reopen Terminal.app. It appears, though, that completely disabling any resume features fixes bash history:

chmod a-rwx ~/Library/Saved\ Application\ State/com.apple.Terminal.savedState

Thanks to willWorkForCookies’s answer to How to prevent one app from saving/restoring any Saved StatewillWorkForCookies’s answer to How to prevent one app from saving/restoring any Saved State.

There seems to be one case where disabling NSQuitAlwaysKeepsWindows does not work: When the Terminal is killed by killall Terminal, and probably also when it crashes or when it is forced quit.

I use killall Terminal regularly, but when the resume kicks in, it messes up my bash history. Basically, commands from the session after the resume will not be saved. Normal saving behaviour is only restored after I quit and reopen Terminal.app. It appears, though, that completely disabling any resume features fixes bash history:

chmod a-rwx ~/Library/Saved\ Application\ State/com.apple.Terminal.savedState

Thanks to willWorkForCookies’s answer to How to prevent one app from saving/restoring any Saved State.

There seems to be one case where disabling NSQuitAlwaysKeepsWindows does not work: When the Terminal is killed by killall Terminal, and probably also when it crashes or when it is forced quit.

I use killall Terminal regularly, but when the resume kicks in, it messes up my bash history. Basically, commands from the session after the resume will not be saved. Normal saving behaviour is only restored after I quit and reopen Terminal.app. It appears, though, that completely disabling any resume features fixes bash history:

chmod a-rwx ~/Library/Saved\ Application\ State/com.apple.Terminal.savedState

Thanks to willWorkForCookies’s answer to How to prevent one app from saving/restoring any Saved State.

Source Link
mach
  • 899
  • 1
  • 8
  • 16

There seems to be one case where disabling NSQuitAlwaysKeepsWindows does not work: When the Terminal is killed by killall Terminal, and probably also when it crashes or when it is forced quit.

I use killall Terminal regularly, but when the resume kicks in, it messes up my bash history. Basically, commands from the session after the resume will not be saved. Normal saving behaviour is only restored after I quit and reopen Terminal.app. It appears, though, that completely disabling any resume features fixes bash history:

chmod a-rwx ~/Library/Saved\ Application\ State/com.apple.Terminal.savedState

Thanks to willWorkForCookies’s answer to How to prevent one app from saving/restoring any Saved State.