Command line spec/override for closeOnExit #13707

Open
opened 2026-01-31 03:49:57 +00:00 by claunia · 2 comments
Owner

Originally created by @vefatica on GitHub (May 2, 2021).

The ability to specify the closeOnExit behavior would be even more useful if it could be specified on the command line. It would then not be limited to profiles and could even be used to override a profile's setting.

Taking a cue from CMD's /C and /K, you might use -c (close the tab/pane) and -k (keep the tab/pane)

Originally created by @vefatica on GitHub (May 2, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> The ability to specify the closeOnExit behavior would be even more useful if it could be specified on the command line. It would then not be limited to profiles and could even be used to override a profile's setting. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Taking a cue from CMD's /C and /K, you might use -c (close the tab/pane) and -k (keep the tab/pane) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-TaskProduct-TerminalArea-Commandline labels 2026-01-31 03:49:57 +00:00
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (May 3, 2021):

Git uses -c name=value for overriding configuration files. Windows Terminal could perhaps support -c closeOnExit=graceful likewise. However, it might lead to ambiguity if some setting allows both the Boolean true and the string "true" in JSON. Also, it would be more tedious to type than a dedicated option (especially if the name is case-sensitive), although that would matter less in scripting.

@KalleOlaviNiemitalo commented on GitHub (May 3, 2021): Git uses -c name=value for overriding configuration files. Windows Terminal could perhaps support `-c closeOnExit=graceful` likewise. However, it might lead to ambiguity if some setting allows both the Boolean `true` and the string `"true"` in JSON. Also, it would be more tedious to type than a dedicated option (especially if the name is case-sensitive), although that would matter less in scripting.
Author
Owner

@zadjii-msft commented on GitHub (May 3, 2021):

Yea, sure we can toss this on the backlog.

Sure starting to seem like we should have commandline switches for everything in a profile 😄

@zadjii-msft commented on GitHub (May 3, 2021): Yea, sure we can toss this on the backlog. Sure starting to seem like we should have commandline switches for _everything_ in a profile 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13707