macOS: Restore window buffers when restoring windows after a relaunch #2679
Replies: 1 comment 2 replies
-
This is a duplicate. I’m on mobile so I’ll have to find the other but I know this already exists as an issue or discussion. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One of the Terminal.app features I really like is when I quit and relaunch and it restores all my windows, it also restores their buffers. Example screenshot:
This is handy because it lets me know what I was actually doing in that window, and in particular it often provides a handy reference for the last command I ran if my history has gotten too cluttered to easily find it again (this is very useful in the window I have dedicated to SSHing in to another machine whose hostname I can never fully remember).
Terminal.app actually goes a step further and ships a
/etc/bashrc_Apple_Terminal
file that coordinates with Terminal.app1 to implement per-session history. This is something I've always had on my todo list as something to maybe look at reimplementing for Fish if possible. I'm not suggesting that Ghostty attempt to offer the same history restoration thing, though setting/restoring the sameTERM_SESSION_ID
env var Terminal uses might be nice to allow users the option of reimplementing it themselves (or sourcing/etc/bashrc_Apple_Terminal
, though that also includes the OSC 7 stuff).Footnotes
This is done with a
TERM_SESSION_ID
env var containing a UUID that's unique per window/tab and persists across relaunch. ↩Beta Was this translation helpful? Give feedback.
All reactions