[PR #4852] [MERGED] Add WT_PROFILE_ID to the environment of the spawned process #25986

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4852
Author: @oising
Created: 3/9/2020
Status: Merged
Merged: 4/17/2020
Merged by: @undefined

Base: masterHead: feature/profile-env-vars


📝 Commits (10+)

  • 9aaae49 add wt_defaults and wt_profile env vars
  • c06b6e7 remove commented code
  • 410f9ff wt_profile -> wt_profiles (match filename)
  • bf2c2bd as per devops nit, invoke-codeformat
  • fd71f0a add nullptr check around _environment (az shell won't set these vars)
  • 5ad2c6a make nullptr check idiomatic with rest of codebase
  • 1d5524b address review nits; add WT_PROFILE_ID var for current profile
  • fe534fa undo VS mods to openconsole.sln
  • bd75029 remove more dead code
  • e8309b8 add newline to end of openconsole.sln... grrr

📊 Changes

5 files changed (+58 additions, -11 deletions)

View changed files

📝 .github/actions/spell-check/dictionary/apis.txt (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+23 -7)
📝 src/cascadia/TerminalConnection/ConptyConnection.cpp (+24 -2)
📝 src/cascadia/TerminalConnection/ConptyConnection.h (+9 -1)
📝 src/cascadia/TerminalConnection/ConptyConnection.idl (+1 -1)

📄 Description

This commit adds a WT_PROFILE_ID environment variable, which contains
the guid of the active profile.

It also teaches ConptyConnection to take an environment map on creation.

We had to do a little manual jiggery with the WSLENV environment
variable as passed by the creator.

  • CLA signed
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already.

Ran terminal, validated vars and translated paths under windows and WSL.

References #4566 (this PR originally introduced WT_SETTINGS/DEFAULTS)
Closes #3589


🔄 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/4852 **Author:** [@oising](https://github.com/oising) **Created:** 3/9/2020 **Status:** ✅ Merged **Merged:** 4/17/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `feature/profile-env-vars` --- ### 📝 Commits (10+) - [`9aaae49`](https://github.com/microsoft/terminal/commit/9aaae49446ae99684718cbbae43ab363c4ce95c1) add wt_defaults and wt_profile env vars - [`c06b6e7`](https://github.com/microsoft/terminal/commit/c06b6e7fc2abf9b2a707873d558a4844ac1c1d3d) remove commented code - [`410f9ff`](https://github.com/microsoft/terminal/commit/410f9ff99ef7115294a1bec40c12e65634095fb8) wt_profile -> wt_profiles (match filename) - [`bf2c2bd`](https://github.com/microsoft/terminal/commit/bf2c2bdd6889c7bf8fa9a046c6a7d8054033f106) as per devops nit, invoke-codeformat - [`fd71f0a`](https://github.com/microsoft/terminal/commit/fd71f0a1b4f34b272f9bcb594478ad2f56e571bb) add nullptr check around _environment (az shell won't set these vars) - [`5ad2c6a`](https://github.com/microsoft/terminal/commit/5ad2c6a44324b1721eb499cd5b95b2c9bf76f889) make nullptr check idiomatic with rest of codebase - [`1d5524b`](https://github.com/microsoft/terminal/commit/1d5524b0664c3cd764543f5c9dea2515631c4cd0) address review nits; add WT_PROFILE_ID var for current profile - [`fe534fa`](https://github.com/microsoft/terminal/commit/fe534fab72d8fef39001cc629fe68f9b8137c6a4) undo VS mods to openconsole.sln - [`bd75029`](https://github.com/microsoft/terminal/commit/bd750295abea6f01b8a36f22dd04f643a33aedc1) remove more dead code - [`e8309b8`](https://github.com/microsoft/terminal/commit/e8309b8f0202d199decda1beb4b99eaf7d9f9ad4) add newline to end of openconsole.sln... grrr ### 📊 Changes **5 files changed** (+58 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spell-check/dictionary/apis.txt` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+23 -7) 📝 `src/cascadia/TerminalConnection/ConptyConnection.cpp` (+24 -2) 📝 `src/cascadia/TerminalConnection/ConptyConnection.h` (+9 -1) 📝 `src/cascadia/TerminalConnection/ConptyConnection.idl` (+1 -1) </details> ### 📄 Description This commit adds a `WT_PROFILE_ID` environment variable, which contains the guid of the active profile. It also teaches ConptyConnection to take an environment map on creation. We had to do a little manual jiggery with the WSLENV environment variable as passed by the creator. * [x] CLA signed * [ ] Tests added/passed * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. Ran terminal, validated vars and translated paths under windows and WSL. References #4566 (this PR originally introduced WT_SETTINGS/DEFAULTS) Closes #3589 --- <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:13:07 +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#25986