Thanks for putting me on the right track. With some slight adjustment, I managed to get this to work for both 3.2a and 2.7.
On 5/22/26, 10:15, "Nicholas Marriott" wrote:
Instead of using confirm use a custom prompt. This works for master, I can't tell you about 3.2, you may have to adapt it:
set -g remain-on-exit on
set-hook -g pane-died {
command-prompt -1p 'Respawn pane #{pane_id}?' "if -F '#{m/r:[Yy],%1}' 'respawnp' 'killp'"
}
On Fri, 22 May 2026 at 17:34, 'Morgan, Iain (ARC-TNC)[InuTeq, LLC]' via tmux-users <
tmux-...@googlegroups.com <mailto:
tmux-...@googlegroups.com> <mailto:
tmux-...@googlegroups.com <mailto:
tmux-...@googlegroups.com>>> wrote:
Hi,
Currently, I use a hook to call "confirm respawn-pane" when the command in the pane has terminated. That works fine in cases where I want to respawn the pane, but I'd like tmux to kill the pane if I do not select to respawn it.
Essentially, if I enter "y" at the confirmation prompt, I want to respawn the pane, but I want the pane to be killed if I enter 'n." Is there a way to do this in version 2.7 or 3.2a?
Thanks,
--
Iain Morgan
--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to