Make it possible to use an existing profile if an app is launched via defterm #14870

Closed
opened 2026-01-31 04:21:47 +00:00 by claunia · 4 comments
Owner

Originally created by @dhrdlicka on GitHub (Aug 15, 2021).

Description of the new feature/enhancement

There should be an option to check whether there is a profile that would match the command line of a console app launched when Terminal is set as default and use that profile.

This would be a nice alternative to using the conhost configuration (#9458) as some people might prefer to use their already defined profiles rather than what's defined in the registry or shortcuts.

Proposed technical implementation details (optional)

Some extra thought should be given to handling command line arguments in both the profile's commandLine and the launched app's command line. A sane compromise could be that a launched app's command line would only match commandLine with either the exact same arguments or none at all to make sure that cmd.exe doesn't get launched with a profile defined for some batch file.

Originally created by @dhrdlicka on GitHub (Aug 15, 2021). # Description of the new feature/enhancement There should be an option to check whether there is a profile that would match the command line of a console app launched when Terminal is set as default and use that profile. This would be a nice alternative to using the conhost configuration (#9458) as some people might prefer to use their already defined profiles rather than what's defined in the registry or shortcuts. # Proposed technical implementation details (optional) Some extra thought should be given to handling command line arguments in both the profile's `commandLine` and the launched app's command line. A sane compromise could be that a launched app's command line would only match `commandLine` with either the exact same arguments or none at all to make sure that `cmd.exe` doesn't get launched with a profile defined for some batch file.
claunia added the Resolution-Fix-CommittedIssue-TaskProduct-TerminalArea-DefApp labels 2026-01-31 04:21:47 +00:00
Author
Owner

@WSLUser commented on GitHub (Aug 16, 2021):

I'm pretty sure part of "what's defined in registry or shortcuts" would include the existing profiles. When that feature is added, passing those existing profiles off to the registry would almost certainly be a hard requirement for precisely the use-case you bring up here.

@WSLUser commented on GitHub (Aug 16, 2021): I'm pretty sure part of "what's defined in registry or shortcuts" would include the existing profiles. When that feature is added, passing those existing profiles off to the registry would almost certainly be a hard requirement for precisely the use-case you bring up here.
Author
Owner

@zadjii-msft commented on GitHub (Aug 17, 2021):

@miniksa has thoughts on this. (also related: #10669)

@zadjii-msft commented on GitHub (Aug 17, 2021): @miniksa has thoughts on this. (also related: #10669)
Author
Owner

@miniksa commented on GitHub (Aug 17, 2021):

I did think that I had a feature logged for this but I cannot find it. It might have just been a feature in my head. I would like to perform some sort of matching against the profiles and left provisions in for passing this sort of information around in at least a few places.

@miniksa commented on GitHub (Aug 17, 2021): I did think that I had a feature logged for this but I cannot find it. It might have just been a feature in my head. I would like to perform some sort of matching against the profiles and left provisions in for passing this sort of information around in at least a few places.
Author
Owner

@ghost commented on GitHub (Oct 20, 2021):

:tada:This issue was addressed in #11390, which has now been successfully released as Windows Terminal Preview v1.12.2922.0.🎉

Handy links:

@ghost commented on GitHub (Oct 20, 2021): :tada:This issue was addressed in #11390, which has now been successfully released as `Windows Terminal Preview v1.12.2922.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.12.2922.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14870