tmux-plugins/tmux-resurrect
View on GitHubTodos for improving save and restore tmux pane contents feature
Open
#81 opened on Apr 2, 2015
help wanted
Description
Open todos for "save and restore tmux pane contents" feature which was contributed by @laomaiweng in #79.
Currently known glitches:
the initial shell prompt (and any output from .bashrc or whatever init script or user activity) is still visible above the restored data (though you have to scroll all the way to the top to see it);fixed via https://github.com/tmux-plugins/tmux-resurrect/commit/c85a3b4487b2d97c3bfc92c583c595c5fc83603da cat command is visibly issued to restore the data (though, yet again, you have to scroll all the way to the top to see it, and with bash and HISTCONTROL=ignorespace set it doesn't show in the bash history);fixed via https://github.com/tmux-plugins/tmux-resurrect/commit/c85a3b4487b2d97c3bfc92c583c595c5fc83603d- if tmux-resurrect doesn't restore any running process, a shell prompt (the "current" prompt) is issued after the restored pane contents, which sort of comes as an "additional" prompt if the last line of the restored pane contents was itself a prompt;
- if tmux-resurrect does restore a running process (e.g. vim), its output will appear twice: first in the restored pane contents (the process was running during the save) and when restoring the process.
Todos:
- pane content files are stored in
~/.tmux/resurrect/dir. Maybe store them in~/.tmux/resurrect/pane_contents/so they don't clutter main dir? - implement compression of pane content files
gziporbz2. Idea by @laomaiweng, brought up here - Try fixing glitches 1 and 2. Ideas for doing this unobtrusively (all of these have downsides):
tmux new-window "cat pane_contents_file; bash"- will restore pane contents and start a shell in the pane. Idea here.cat some_file >> /dev/ttys123where tty is tty of current pane. Idea brought up here.
- do not output trailing empty lines when pane content is restored. @laomaiweng has an interesting idea brought up here. The alternative is to implement something like this.
- investigate capturing panes with alternate screen. Brought up here.
- do not save pane content history when a pane is empty (no command was ever executed inside it)