Terminal context Environment variables #10820

Closed
opened 2026-01-31 02:31:09 +00:00 by claunia · 2 comments
Owner

Originally created by @arqtiq on GitHub (Sep 29, 2020).

Description of the new feature/enhancement

Numerous times I tried to automate some settings / profiles edits on the Terminal settings themselves, and I usually lack informations about the current tab environment :

  • What is the current loaded profile / scheme ?
  • Is the host the preview package ?

I'm sure there are also more info we could export to env vars based on people needs.
This would be veery useful to manage the terminal settings / themes / profiles directly from the command line !

Proposed technical implementation details (optional)

When opening a new tab, set:

  • $WT_CURRENT_PROFILE (Microsoft PowerShell, CMD, ...)
  • $WT_CURRENT_SCHEME
  • $WT_IS_PREVIEW (1 / 0, if the current terminal running package is the preview one)
Originally created by @arqtiq on GitHub (Sep 29, 2020). # Description of the new feature/enhancement Numerous times I tried to automate some settings / profiles edits on the Terminal settings themselves, and I usually lack informations about the current tab environment : - What is the current loaded profile / scheme ? - Is the host the preview package ? I'm sure there are also more info we could export to env vars based on people needs. This would be veery useful to manage the terminal settings / themes / profiles directly from the command line ! # Proposed technical implementation details (optional) When opening a new tab, set: - $WT_CURRENT_PROFILE (*Microsoft PowerShell, CMD, ...*) - $WT_CURRENT_SCHEME - $WT_IS_PREVIEW (1 / 0, if the current terminal running package is the preview one)
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 02:31:10 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Sep 29, 2020):

This looks like it's roughly the same as the discussion that's taken place in #4566, so I'm gonna forward this discussion to that thread. Thanks!

/dup #4566

@zadjii-msft commented on GitHub (Sep 29, 2020): This looks like it's roughly the same as the discussion that's taken place in #4566, so I'm gonna forward this discussion to that thread. Thanks! /dup #4566
Author
Owner

@ghost commented on GitHub (Sep 29, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Sep 29, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10820