Enable or Disable Closing Warnings in Windows Terminal

This article provides instructions on how to enable or disable the warning message when closing multiple tabs in Windows Terminal. The process involves either accessing ‘Settings’ and adjusting the ‘Warn when closing more than one tab’ option or manually adding a specific line to the Terminal app’s built-in JSON configuration file.

This article explains how to turn warnings on or off when closing more than one tab in Windows Terminal.

Windows Terminal is a modern host application for the command-line shells, including Command PromptWindows PowerShell, and bash (via Windows Subsystem for Linux (WSL)).

Unlike the previous shell apps in Windows, Windows Terminal has many features, including multiple tabs, panes, Unicode and UTF-8 character support, a GPU-accelerated text rendering engine, and theme customization with text, colors, backgrounds, and shortcuts.

When you close Windows Terminal with more than one tab open, you will get a warning message “Do you want to close all tabs?“.

This is the default behavior. However, if you are not getting the prompt when closing Windows Terminal with multiple tabs open, here’s how to enable or disable it.

Turn on or off warning when closing Windows Terminal with multiple tabs

As described above, you will be alerted when you close Windows Terminal with more than one tab open by default.

If you are not getting a warning, here’s how to turn it on or off if you don’t want it enabled.

First, open the Windows Terminal app.

You can do that by clicking on the Start menu and searching for Terminal. Then, under Best match, select and open the Windows Terminal app.

When the Terminal app opens, click the down arrow button on the top bar, and select Settings (Ctrl +,).

On the Settings window, click on the Interaction tab. Then select the tile “Warn when closing more than one tab,” and toggle the button to the On position to enable the Terminal app to warn you when closing with multiple tabs.

To disable it, toggle the button back to the Off position.

Click on the Save button to save your changes and exit.

Turn on or off warning when closing the Terminal app with multiple tabs using JSON file

Another way you can enable or disable this feature in the Terminal app is to use its built-in JSON configuration file.

Select the Open JSON file button on the bottom left.

When the file opens, location the highlighted section.

To disable the warning, add the line below to the exact area of the configuration file.

Disable:

"confirmCloseAllTabs":false,

Add the line at the exact location in the file and save.

    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "confirmCloseAllTabs":false,
    "profiles":

Enable:

"confirmCloseAllTabs":true,

Add the line to the exact location in the configuration file.

    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "confirmCloseAllTabs":true,
    "profiles":

Save the JSON configuration file to apply your changes.

Below is an example of the Windows Terminal app with a warning window.

That should do it!

Reference:

https://learn.microsoft.com/en-us/windows/terminal/

Conclusion:

  • Windows Terminal allows users to manage multiple tabs and panes for improved productivity.
  • Users can easily customize their experience by enabling or disabling the warning prompt when closing multiple tabs in the Terminal app.
  • The flexibility to modify this feature through both the app settings and the JSON configuration file offers convenience for users with different preferences.
  • Clear instructions for both methods are provided, ensuring a seamless process for enabling or disabling the warning prompt.
  • For additional information or to contribute feedback, users can refer to the provided Microsoft link or utilize the comment section for further discussion.
Richard Avatar

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *