Skip to content

Commit

Permalink
Document "automatic" as a value for the CloseOnExit setting (#791)
Browse files Browse the repository at this point in the history
Closes #661
  • Loading branch information
PankajBhojwani authored Aug 26, 2024
1 parent ad825e5 commit 0aa6c1c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TerminalDocs/customize-settings/profile-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,17 @@ ___

## Profile termination behavior

This sets how the profile reacts to termination or failure to launch. `"graceful"` will close the profile when `exit` is typed or when the process exits normally. `"always"` will always close the profile and `"never"` will never close the profile. `true` and `false` are accepted as synonyms for `"graceful"` and `"never"`, respectively.
This sets how the profile reacts to termination or failure to launch. `"graceful"` will close the profile when `exit` is typed or when the process exits normally. `"always"` will always close the profile and `"never"` will never close the profile. `"automatic"` was added once Windows Terminal was allowed to be the default terminal application; for processes launched in Terminal directly, it behaves the same as `"graceful"` but for processes that were handed off to Terminal it behaves the same as `"always"`.

`true` and `false` are accepted as synonyms for `"graceful"` and `"never"`, respectively.

**Property name:** `closeOnExit`

**Necessity:** Optional

**Accepts:** `"graceful"`, `"always"`, `"never"`, `true`, `false`
**Accepts:** `"automatic"`, `"graceful"`, `"always"`, `"never"`, `true`, `false`

**Default value:** `"graceful"`
**Default value:** `"automatic"`

> [!NOTE]
> In Windows Command Prompt (cmd.exe), `exit` will return the return code of the previous command. If the command you typed before `exit` resulted in an error, then `"closeOnExit": "graceful"` will still show that error code, instead of closing the tab.
Expand Down

0 comments on commit 0aa6c1c

Please sign in to comment.