Allow setting environment variables in profiles #11542

Closed
opened 2026-01-31 02:50:39 +00:00 by claunia · 3 comments
Owner

Originally created by @xnoreq on GitHub (Nov 22, 2020).

Description of the new feature/enhancement

Allow setting environment variables in profiles.
This eliminates the need to launch wrapper tools or scripts that set environment variables and then launch a shell.

Proposed technical implementation details (optional)

Add a new "environmentVariables" property to profiles, which contains an object with additional environment variables.
The "commandline" is then started with these environment variable set.

Example:

{
	"guid": "{some guid}",
	"name": "Bash",
	"commandline": "C:\\bash.exe",
	"hidden": false,
	"environmentVariables": {
		"ENVVAR1": "VALUE1",
		"ENVVAR2": "VALUE2
	}
}
Originally created by @xnoreq on GitHub (Nov 22, 2020). # Description of the new feature/enhancement Allow setting environment variables in profiles. This eliminates the need to launch wrapper tools or scripts that set environment variables and then launch a shell. # Proposed technical implementation details (optional) Add a new "environmentVariables" property to profiles, which contains an object with additional environment variables. The "commandline" is then started with these environment variable set. Example: ``` { "guid": "{some guid}", "name": "Bash", "commandline": "C:\\bash.exe", "hidden": false, "environmentVariables": { "ENVVAR1": "VALUE1", "ENVVAR2": "VALUE2 } } ```
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 02:50:39 +00:00
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Nov 22, 2020):

Also requested in https://github.com/microsoft/terminal/issues/2785 and https://github.com/microsoft/terminal/issues/6604.

@KalleOlaviNiemitalo commented on GitHub (Nov 22, 2020): Also requested in <https://github.com/microsoft/terminal/issues/2785> and <https://github.com/microsoft/terminal/issues/6604>.
Author
Owner

@zadjii-msft commented on GitHub (Nov 23, 2020):

Yep, sure is. Thanks for the help @KalleOlaviNiemitalo!

/dup #2785

@zadjii-msft commented on GitHub (Nov 23, 2020): Yep, sure is. Thanks for the help @KalleOlaviNiemitalo! /dup #2785
Author
Owner

@ghost commented on GitHub (Nov 23, 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 (Nov 23, 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#11542