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.
@matheuss This is my PR #945
@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_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:
shell_session_save_user_state functiontrap ... 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.
@Kentzo I like that idea.
let's continue here https://github.com/zeit/hyper/pull/945
Most helpful comment
@matheuss This is my PR #945