[PR #5690] Make profile names, scheme names case-insensitive #26434

Closed
opened 2026-01-31 09:16:05 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/5690

State: closed
Merged: No


Summary of the Pull Request

This PR changes profile names and color scheme names to be treated case-insensitively.

Profiles

  • For new-tab -p <profile name>, <profile name> can be case insensitive
  • For ShortcutActions that use profile (which accepts a "name"), the value of profile can be a case-insensitive name
  • For profiles with the case-insensitive same name, AND NO GUID, we'll still generate different GUIDs for them.
    • If you've got multiple profiles with the case-insensitive same name, only the first profile will be addressable by new-tab -p <name> and newTab actions.

Color Schemes

  • Schemes retain their case sensitive names internally
  • Schemes now layer on schemes with the same case-insensitive name (previously, they'd only layer on schemes with the same case-sensitive name).
  • We use a map<name, Scheme> to store schemes in the app settings. Now, we always store schemes under the std::towlower version of their name in that map.
  • Profiles can now specify a scheme by it's case-insensitive name

References

PR Checklist

  • Lets us rename Campbell Powershell to Campbell PowerShell
  • I work here
  • Tests added/passed
  • Requires documentation to be updated

Validation Steps Performed

  • image
  • Tried setting the color scheme of that profile to "bUiLtIn TaNgO dArK", that worked just fine
  • Added a "BUILTIN TANGO DARK" scheme that changed every color to rgb(255, 0, 0), boy was my terminal RED.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/5690 **State:** closed **Merged:** No --- ## Summary of the Pull Request This PR changes profile names and color scheme names to be treated case-insensitively. #### Profiles * For `new-tab -p <profile name>`, `<profile name>` can be case insensitive * For `ShortcutAction`s that use `profile` (which accepts a "name"), the value of `profile` can be a case-insensitive name * For profiles with the case-insensitive same `name`, AND NO GUID, we'll still generate different GUIDs for them. - If you've got multiple profiles with the case-insensitive same `name`, only the first profile will be addressable by `new-tab -p <name>` and `newTab` actions. #### Color Schemes * Schemes retain their case sensitive `name`s internally * Schemes now layer on schemes with the same case-insensitive `name` (previously, they'd only layer on schemes with the same case-sensitive `name`). * We use a `map<name, Scheme>` to store schemes in the app settings. Now, we always store schemes under the `std::towlower` version of their name in that map. * Profiles can now specify a scheme by it's case-insensitive `name` ## References ## PR Checklist * [x] Lets us rename `Campbell Powershell` to `Campbell PowerShell` * [x] I work here * [x] Tests added/passed * [ ] Requires documentation to be updated ## Validation Steps Performed * ![image](https://user-images.githubusercontent.com/18356694/80822764-03532e80-8ba1-11ea-9a8f-cd200e8d3198.png) * Tried setting the color scheme of that profile to "bUiLtIn TaNgO dArK", that worked just fine * Added a "BUILTIN TANGO DARK" scheme that changed every color to `rgb(255, 0, 0)`, boy was my terminal RED.
claunia added the pull-request label 2026-01-31 09:16:05 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26434