terminal/src/cascadia/TerminalConnection
Leonard Hecker 479ef264b2
Implement basic profile matching (#11390)
This implements command line matching for `CascadiaSettings::GetProfileForArgs`.
The command lines for all user profiles are resolved to absolute file paths,
argument quotes are standardized ("canonicalized") and the results are cached.

When `GetProfileForArgs` is called with a Commandline() value, we "canonicalize"
the argument as well and find the profile that is the longest prefix.
If none could be found the default profile is returned.

## PR Checklist
* [x] Closes #9458
* [x] Closes #10952
* [x] I work here
* [ ] Tests added/passed

## Validation Steps Performed

* Open a `cmd.exe` tab in the store-version of WT
* Run `start cmd`
  --> A tab with the `cmd.exe` profile opens
* Run `start pwsh.exe`
  --> A tab with the PowerShell 7 profile opens
* Run PowerShell 7 from the start menu
  --> A tab with the PowerShell 7 profile opens
* Create a symlink for PowerShell 7 and launch `pwsh.exe` from there
  --> A tab with the PowerShell 7 profile opens
2021-10-08 00:40:10 +00:00
..
Resources/en-US Change exit code to hex; Fix format spec (#11123) 2021-09-21 15:47:17 +00:00
AzureClient.h Rework error handling and state flow in the Azure connection (#5356) 2020-04-16 17:32:52 -07:00
AzureClientID.h Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
AzureConnection.cpp Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
AzureConnection.h Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
AzureConnection.idl Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
ConnectionInformation.cpp Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
ConnectionInformation.h Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
ConnectionInformation.idl Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
ConnectionStateHolder.h Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
ConptyConnection.cpp Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
ConptyConnection.h Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
ConptyConnection.idl Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
CTerminalHandoff.cpp [DefApp] Move from Monarch multi instance servers to Peasant single instance servers (#10823) 2021-08-05 17:05:21 +00:00
CTerminalHandoff.h [DefApp] Move from Monarch multi instance servers to Peasant single instance servers (#10823) 2021-08-05 17:05:21 +00:00
EchoConnection.cpp From orbit, nuke the Telnet connection and all supporting infra. (#7840) 2020-10-09 18:59:58 +00:00
EchoConnection.h Switch Connections to use ValueSets to initialize them (#10184) 2021-07-20 15:02:17 +00:00
EchoConnection.idl Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
init.cpp Hook up the WIL fallback error tracer in Terminal (#7864) 2020-10-09 22:20:12 +00:00
ITerminalConnection.idl Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
packages.config Upgrade to C++/WinRT 2.0.210825.3 (#11188) 2021-09-10 21:33:13 +00:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
TerminalConnection.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
TerminalConnection.vcxproj Change exit code to hex; Fix format spec (#11123) 2021-09-21 15:47:17 +00:00
TerminalConnection.vcxproj.filters Change exit code to hex; Fix format spec (#11123) 2021-09-21 15:47:17 +00:00