Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab remains open even on process exit #9596

Closed
rashil2000 opened this issue Mar 24, 2021 · 5 comments
Closed

Tab remains open even on process exit #9596

rashil2000 opened this issue Mar 24, 2021 · 5 comments
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered

Comments

@rashil2000
Copy link
Contributor

Windows Terminal version (or Windows build number)

10.0.19042.870 1.7.572.0

Other Software

No response

Steps to reproduce

This doesn't happen each time, but it does happen often enough to be annoying - leading me to file this issue.

Shell is mostly irrelevant - I use a variety of them - CMD, Powershell, Powershell Core, Msys Bash, Msys Zsh, WSL1/2, SSH sessions etc.

Open a shell. Do some work. Exit it with Ctrl+D. (This is a fairly preferred way of closing a shell without typing 'exit' or reaching for the mouse to close the tab)

Expected Behavior

The tab to get closed.

Actual Behavior

This happens instead (screenshot below):

The tab remains open.

image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Mar 24, 2021
@skyline75489
Copy link
Collaborator

When the return code of the process is 1 instead of 0, this is expected.

You can find out more in the documentation about closeOnExit.

See also #4223, #5003.

@zadjii-msft
Copy link
Member

Thanks for the report! Please make sure to search for duplicates when filing new issues. Like skyline75489 mentioned, this is by-design for the closeOnExit setting.

@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered labels Mar 24, 2021
@rashil2000
Copy link
Contributor Author

rashil2000 commented Mar 24, 2021

Thanks for the link @zadjii-msft!

The reason I filed a new issue was because of a possible resolution I had in mind (apart from modifying closeOnExit behavior, obviously, as @skyline75489 mentioned) - namely - having a keybind that closes a tab. I searched for that and couldn't find anything in the issues, hence a new one. Would you mind reopening this if such a feature doesn't exist?

@zadjii-msft
Copy link
Member

closePane will close the tab if there's only one pane in the tab. That's why it's the action bound to ctrl+shift+w by default.

There's also a closeTab action, which will close the tab even when multiple panes are open.

@rashil2000
Copy link
Contributor Author

Okay, thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants