It would be useful to have an option for kill-pane and kill-window to affect dead panes/windows only. For example: To bulk clean-up all dead panes and windows (those with remain-on-exit on) without affecting live panes, it would be quick and easy to use a -d option:
tmux kill-pane -ad
tmux kill-window -ad
Likewise, if -d is used with -t it would only kill the target pane/window if dead (but if -dt is used with a live target, the exit code should probably be non-zero).
It should also be clarified in the documentation that kill-pane only affects the current window, and kill-window only affects the current session.
It would be useful to have an option for
kill-paneandkill-windowto affect dead panes/windows only. For example: To bulk clean-up all dead panes and windows (those withremain-on-exiton) without affecting live panes, it would be quick and easy to use a-doption:tmux kill-pane -adtmux kill-window -adLikewise, if
-dis used with-tit would only kill the target pane/window if dead (but if-dtis used with a live target, the exit code should probably be non-zero).It should also be clarified in the documentation that
kill-paneonly affects the current window, andkill-windowonly affects the current session.