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.
normally,
ps.sh
takes the output oftmux 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 withtmux 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