greymd / tmux-xpanes

Awesome tmux-based terminal divider
MIT License
1.96k stars 61 forks source link

Option to respawn a pane #145

Closed madduck closed 4 years ago

madduck commented 4 years ago

Hey, how about when the "pane is dead, press enter to exit" message is displayed, I could press e.g. space instead, and it would cause the same command to be executed again, effectively respawning the pane?

Thanks!

greymd commented 4 years ago

Hi :) Honestly I can't imagine a use case where that feature is helpful. Could you describe a situation where you need that feature?

madduck commented 4 years ago

I regularly open a window with 4 panes to a remote host showing top, syslog, and a few other monitoring thingies. And occasionally, I'll hit ctrl-c or q in a pane, and then the pane is dead, and I cannot restart it, but instead have to close the entire window and re-open it.

madduck commented 4 years ago

I can of course just call respawn-pane myself…

linuxmail commented 3 years ago

On a version ... one or two years ago .. you landed on the local shell and had not a dead pane. So you was able to reuse the ssh command. My college found it also very annoying and searched (diff new / old xpanes) for it ... it seems something with "speedy" option. but I'm not sure anymore.

greymd commented 3 years ago

Hmm, I don't remember implementing an option to make commands easier to reuse.

By the way, I did not notice the remain-on-exit option of tmux at that time. It might be a lot easier to re-run the command if you always use the xpanes -ss option and putting set -g remain-on-exit in .tmux.conf. (Just call respawn-pane to rerun the comand).

I mean, I'm starting to think that xpanes' own behavior of displaying pane is dead, press enter to exit and keeping the pane is unnecessary...