You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
It'd be really nice if when hypertyerm quit, the current sessions were stored somehow, somewhere, so that when hyperterm restarted, they would be restored. This is most helpful during computer restarts or accidental quits. This is also another handy feature that iTerm has.
Reacted by Ilya Kulakov, Greg Gamel, Nick, Austin Andrews, Thomas Hunsaker, Vlad Shcherbin, Alexander Trauzzi, Franco Gilio, RomanRiesen, mehdi-loup and 1 more
My 2 cents: Terminal.app on macOS, among other things like restoring CWD, passes the TERM_SESSION_ID environment variable into every shell process. If user then quits app with active session, on the next launch all shells will be re-initialized with the same TERM_SESSION_ID.
That allows a user to actually customize the restoration process by doing the following:
User can define the shell_session_save_user_state function
Terminal.app calls that function on exit (registered as trap ... EXIT)
In the implementation user dumps whatever shell commands he wishes to execute to SHELL_SESSION_FILE (which is ~/.bash_sessions/$TERM_SESSION_ID.session for bash)
On the next launch that file is sourced and then deleted
You can find the implementation of this logic in /etc/bashrc_Apple_Terminal.
It opens a lot of possibilities for customization by requiring very little from Hyper: just some kind of unique ID which it should be present anyway.
Activity
ppot commentedon Nov 6, 2016
@matheuss This is my PR #945
Kentzo commentedon Jan 13, 2017
@ppot Thank you a lot for that contribution!
My 2 cents: Terminal.app on macOS, among other things like restoring CWD, passes the
TERM_SESSION_IDenvironment variable into every shell process. If user then quits app with active session, on the next launch all shells will be re-initialized with the sameTERM_SESSION_ID.That allows a user to actually customize the restoration process by doing the following:
shell_session_save_user_statefunctiontrap ... EXIT)SHELL_SESSION_FILE(which is ~/.bash_sessions/$TERM_SESSION_ID.session for bash)You can find the implementation of this logic in /etc/bashrc_Apple_Terminal.
It opens a lot of possibilities for customization by requiring very little from Hyper: just some kind of unique ID which it should be present anyway.
An example of such customization is preserving active virtualenv.
ppot commentedon Jan 13, 2017
@Kentzo I like that idea.
Stanzilla commentedon Apr 23, 2018
let's continue here #945