[PR #9287] [CLOSED] implement env vars in settings (#2785) #27513

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9287
Author: @christapley
Created: 2/25/2021
Status: Closed

Base: mainHead: feature/2785-profile-env-vars-with-string-map


📝 Commits (8)

📊 Changes

18 files changed (+725 additions, -278 deletions)

View changed files

📝 src/cascadia/LocalTests_SettingsModel/ProfileTests.cpp (+184 -0)
📝 src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp (+7 -1)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+2 -1)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+3 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1 -1)
📝 src/cascadia/TerminalApp/TerminalSettings.cpp (+3 -0)
📝 src/cascadia/TerminalApp/TerminalSettings.h (+132 -132)
📝 src/cascadia/TerminalApp/TerminalSettings.idl (+2 -0)
📝 src/cascadia/TerminalControl/IControlSettings.idl (+0 -1)
📝 src/cascadia/TerminalSettingsEditor/Profiles.h (+1 -0)
📝 src/cascadia/TerminalSettingsEditor/Profiles.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+20 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/JsonUtils.h (+42 -0)
📝 src/cascadia/TerminalSettingsModel/Profile.cpp (+173 -0)
📝 src/cascadia/TerminalSettingsModel/Profile.h (+148 -142)
📝 src/cascadia/TerminalSettingsModel/Profile.idl (+4 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalWarnings.idl (+1 -0)

📄 Description

Summary of the Pull Request

  • Implement environment variables with validation
  • use StringMap as a container
  • recursively resolve ${env:NAME} vars in values in the StringMap or in
    the process' environment
  • implement some tests

References

PR Checklist

  • Closes ConPTY Passthrough mode (#2785)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Added tests and manual validation


🔄 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/9287 **Author:** [@christapley](https://github.com/christapley) **Created:** 2/25/2021 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/2785-profile-env-vars-with-string-map` --- ### 📝 Commits (8) - [`b0c426b`](https://github.com/microsoft/terminal/commit/b0c426b455bac3b666a1a89b0a0a10e8d77c98e3) implement env vars in settings (#2785) - [`5036cb0`](https://github.com/microsoft/terminal/commit/5036cb04ba354b6297d097226732a99dd7ec75ec) Invoke-CodeFormat - [`b4efbb8`](https://github.com/microsoft/terminal/commit/b4efbb81960e4f14d40c9ee95e550ef3c6b75b67) Code review feedback - [`5d68c94`](https://github.com/microsoft/terminal/commit/5d68c94fec3902b776293aabb0bfc12ea227843b) Code review update (KalleOlaviNiemitalo) - [`ea56d64`](https://github.com/microsoft/terminal/commit/ea56d64fc41616e019aa633fb39f8ac88a12be99) Fix spelling mistake - [`9ec2218`](https://github.com/microsoft/terminal/commit/9ec221806e88d357bbc0c09b24f19c9e297d5383) Merge branch 'main' into feature/2785-profile-env-vars-with-string-map - [`f1c1cc4`](https://github.com/microsoft/terminal/commit/f1c1cc4ba476d17cf3d577f3513e50c627c1a1c9) fix build (#2785) - [`0b6f411`](https://github.com/microsoft/terminal/commit/0b6f41189025a0cf3b42b4d619fe3749bfb9d140) fix code formatting (#2785) ### 📊 Changes **18 files changed** (+725 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_SettingsModel/ProfileTests.cpp` (+184 -0) 📝 `src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp` (+7 -1) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+2 -1) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+3 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/TerminalSettings.cpp` (+3 -0) 📝 `src/cascadia/TerminalApp/TerminalSettings.h` (+132 -132) 📝 `src/cascadia/TerminalApp/TerminalSettings.idl` (+2 -0) 📝 `src/cascadia/TerminalControl/IControlSettings.idl` (+0 -1) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+20 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/JsonUtils.h` (+42 -0) 📝 `src/cascadia/TerminalSettingsModel/Profile.cpp` (+173 -0) 📝 `src/cascadia/TerminalSettingsModel/Profile.h` (+148 -142) 📝 `src/cascadia/TerminalSettingsModel/Profile.idl` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalWarnings.idl` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request * Implement environment variables with validation * use StringMap as a container * recursively resolve ${env:NAME} vars in values in the StringMap or in the process' environment * implement some tests <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #2785 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [x] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Added tests and manual validation --- <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:22:24 +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#27513