[PR #5232] [MERGED] Patch the default profile and version into the settings template #26196

Open
opened 2026-01-31 09:14:34 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5232
Author: @DHowett-MSFT
Created: 4/4/2020
Status: Merged
Merged: 4/7/2020
Merged by: @DHowett-MSFT

Base: masterHead: dev/duhowett/patch_settings_mode


📝 Commits (4)

  • 65cd6c3 Patch the default profile and version into the settings template
  • 76d0255 Clean this up, it's better-ready for review
  • 64e934d APIS ARE NOW LEGAL
  • 83b29f9 Merge remote-tracking branch 'origin/master' into dev/duhowett/patch_settings_mode

📊 Changes

15 files changed (+143 additions, -35 deletions)

View changed files

.github/actions/spell-check/dictionary/apis.txt (+1 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+49 -0)
📝 src/cascadia/TerminalApp/AppLogic.h (+5 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+3 -0)
📝 src/cascadia/TerminalApp/CascadiaSettings.cpp (+40 -6)
📝 src/cascadia/TerminalApp/CascadiaSettings.h (+2 -1)
📝 src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp (+13 -7)
📝 src/cascadia/TerminalApp/DefaultProfileUtils.cpp (+1 -1)
📝 src/cascadia/TerminalApp/PowershellCoreProfileGenerator.cpp (+11 -1)
📝 src/cascadia/TerminalApp/PowershellCoreProfileGenerator.h (+2 -0)
📝 src/cascadia/TerminalApp/Profile.cpp (+2 -2)
📝 src/cascadia/TerminalApp/Profile.h (+1 -1)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+3 -3)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+7 -12)
📝 src/cascadia/TerminalApp/userDefaults.json (+3 -1)

📄 Description

This pull request introduces unexpanded variables (%DEFAULT_PROFILE%,
%VERSION% and %PRODUCT%) to the user settings template and code to
expand them.

While doing this, I ran into a couple things that needed to widen from
accepting strings to accepting string views. I also had to move
application name and version detection up to AppLogic and expose the
AppLogic singleton.

The dynamic profile generation logic had to be moved to before we inject
the templated variables, as the new default profile depends on the
generated dynamic profiles.

References #5189, #5217 (because it has a dependency on VERSION and
PRODUCT).

PR Checklist

Validation Steps Performed

Deleted my settings and watched them regenerate.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5232 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 4/4/2020 **Status:** ✅ Merged **Merged:** 4/7/2020 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/duhowett/patch_settings_mode` --- ### 📝 Commits (4) - [`65cd6c3`](https://github.com/microsoft/terminal/commit/65cd6c3a7fb47ba1219be0e888bce2ddac8843ea) Patch the default profile and version into the settings template - [`76d0255`](https://github.com/microsoft/terminal/commit/76d02557c8fde9ea6264c978875d36759807a9d9) Clean this up, it's better-ready for review - [`64e934d`](https://github.com/microsoft/terminal/commit/64e934d6604b3583c7ee78d4936205e6ea5f49a7) APIS ARE NOW LEGAL - [`83b29f9`](https://github.com/microsoft/terminal/commit/83b29f9e6c23b8dd35699295d04d71918c4a2fe1) Merge remote-tracking branch 'origin/master' into dev/duhowett/patch_settings_mode ### 📊 Changes **15 files changed** (+143 additions, -35 deletions) <details> <summary>View changed files</summary> ➕ `.github/actions/spell-check/dictionary/apis.txt` (+1 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+49 -0) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+5 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+3 -0) 📝 `src/cascadia/TerminalApp/CascadiaSettings.cpp` (+40 -6) 📝 `src/cascadia/TerminalApp/CascadiaSettings.h` (+2 -1) 📝 `src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp` (+13 -7) 📝 `src/cascadia/TerminalApp/DefaultProfileUtils.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/PowershellCoreProfileGenerator.cpp` (+11 -1) 📝 `src/cascadia/TerminalApp/PowershellCoreProfileGenerator.h` (+2 -0) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+2 -2) 📝 `src/cascadia/TerminalApp/Profile.h` (+1 -1) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+3 -3) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+7 -12) 📝 `src/cascadia/TerminalApp/userDefaults.json` (+3 -1) </details> ### 📄 Description This pull request introduces unexpanded variables (`%DEFAULT_PROFILE%`, `%VERSION%` and `%PRODUCT%`) to the user settings template and code to expand them. While doing this, I ran into a couple things that needed to widen from accepting strings to accepting string views. I also had to move application name and version detection up to AppLogic and expose the AppLogic singleton. The dynamic profile generation logic had to be moved to before we inject the templated variables, as the new default profile depends on the generated dynamic profiles. References #5189, #5217 (because it has a dependency on `VERSION` and `PRODUCT`). ## PR Checklist * [x] Closes #2721 * [x] CLA signed * [x] Tests added/passed * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already ## Validation Steps Performed Deleted my settings and watched them regenerate. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:14:34 +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#26196