Option to confirm before closing a tab #12999

Closed
opened 2026-01-31 03:31:02 +00:00 by claunia · 5 comments
Owner

Originally created by @ercius on GitHub (Mar 12, 2021).

Description of the new feature/enhancement

I accidentally clicked the x on a running Ubuntu terminal (instead of activating that tab) and closed an important ssh session losing all work. There was no confirmation to close the running session.

Can an option to confirm on exit for a single tab be added? There is already an option to confirm when closing many tabs, but not for a single tab.

BTW: Windows Terminal is awesome. Where has this been all my life?

Originally created by @ercius on GitHub (Mar 12, 2021). # Description of the new feature/enhancement I accidentally clicked the x on a running Ubuntu terminal (instead of activating that tab) and closed an important ssh session losing all work. There was no confirmation to close the running session. Can an option to confirm on exit for a single tab be added? There is already an option to confirm when closing many tabs, but not for a single tab. BTW: Windows Terminal is awesome. Where has this been all my life?
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 03:31:02 +00:00
Author
Owner

@Nacimota commented on GitHub (Mar 14, 2021):

This seems pretty reasonable to me as an optional feature, disabled by default. Perhaps we could even have it as a per-profile setting? So for instance if you have a profile you mostly use for SSH or something important you don't want to accidentally close you could set warnOnClose (or whatever) to true.

@Nacimota commented on GitHub (Mar 14, 2021): This seems pretty reasonable to me as an optional feature, disabled by default. Perhaps we could even have it as a per-profile setting? So for instance if you have a profile you mostly use for SSH or something important you don't want to accidentally close you could set `warnOnClose` (or whatever) to `true`.
Author
Owner

@Don-Vito commented on GitHub (Mar 14, 2021):

@Nacimota - great idea.

@ercius - consider using read-only panes for important stuff (https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#mark-a-pane-as-read-only-preview).

In addition, there is https://github.com/microsoft/terminal/issues/3335, suggesting to hide the "x" button to prevent such faulty clicks.

@Don-Vito commented on GitHub (Mar 14, 2021): @Nacimota - great idea. @ercius - consider using read-only panes for important stuff (https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#mark-a-pane-as-read-only-preview). In addition, there is https://github.com/microsoft/terminal/issues/3335, suggesting to hide the "x" button to prevent such faulty clicks.
Author
Owner

@ercius commented on GitHub (Mar 14, 2021):

warnOnClose is a great option to have per tab.

Ill also check out the read-only panes in Preview and see how they work. Thanks!

@ercius commented on GitHub (Mar 14, 2021): `warnOnClose` is a great option to have per tab. Ill also check out the read-only panes in Preview and see how they work. Thanks!
Author
Owner

@zadjii-msft commented on GitHub (Mar 15, 2021):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #6549 for more discussion.

/dup #6549

@zadjii-msft commented on GitHub (Mar 15, 2021): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #6549 for more discussion. /dup #6549
Author
Owner

@ghost commented on GitHub (Mar 15, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Mar 15, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12999