tmux-plugins / tmux-resurrect

Persists tmux environment across system restarts.
MIT License
11.42k stars 424 forks source link

Safe mode for program restoring #380

Open chrysn opened 3 years ago

chrysn commented 3 years ago

While for some programs I hope to eventually become sure enough to just use program restoring (vim is on the way there), with most programs I don't dare do things automatically but it'd be convenient to still know what was run.

Thus, a feature suggestion:

Programs not explicitly restored are still stored, but not run. When a pane is restored, a message a la "This pane was executing this command: mutt -f=mailinglists/foobar" is printed before the default command (shell) is run.

(I'm picking mutt as an example because I do not dare run mutt automatically: If I was just replying to an EMail, tmux-resurrect couldn't know that from looking at the child process, but the captured pane content would tell me which file in /var/tmp I'd have to use to resurrect that mail. I could see that if after an auto-start I pressed Ctrl-Z to peek into what was there outside alternative mode, but unless I explicitly remember I'd just lose the mail to rot in /var/tmp).