tmux-plugins / tmux-resurrect

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

support `tmux split-pane` when restoring processes with `ps` strategy #518

Open jyn514 opened 3 months ago

jyn514 commented 3 months ago

normally, ps.sh takes the output of tmux list-panes -F "#{pane_pid}" and looks for all the children of that process with a controlling terminal, because that process is usually a shell. but if the process in a pane was spawned with tmux split-pane, it will have no parent process other than the tmux server itself.

support this use case by falling back to the active process if the active process has no children with a controlling terminal.

fixes https://github.com/tmux-plugins/tmux-resurrect/issues/517