tmux-plugins/tmux-resurrect

Todos for improving save and restore tmux pane contents feature

Open

#81 opened on Apr 2, 2015

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Shell (12,753 stars) (509 forks)batch import
help wanted

Description

Open todos for "save and restore tmux pane contents" feature which was contributed by @laomaiweng in #79.

Currently known glitches:

  1. 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/c85a3b4487b2d97c3bfc92c583c595c5fc83603d
  2. a 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
  3. 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;
  4. 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 gzip or bz2. 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/ttys123 where 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)

Contributor guide