forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply environment variables after shell initialization scripts are ru…
…n in `pythonTerminalEnvVarActivation` experiment (#21290) For #11039 #20822 Closes #21297 Update proposed APIs to be used in Terminal activation experiment.
- Loading branch information
Kartik Raj
authored
May 26, 2023
1 parent
72f7ef8
commit c213491
Showing
6 changed files
with
141 additions
and
70 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
types/src/vscode-dts/vscode.proposed.envCollectionOptions.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
declare module 'vscode' { | ||
|
||
// https://github.com/microsoft/vscode/issues/179476 | ||
|
||
/** | ||
* Options applied to the mutator. | ||
*/ | ||
export interface EnvironmentVariableMutatorOptions { | ||
/** | ||
* Apply to the environment just before the process is created. | ||
* | ||
* Defaults to true. | ||
*/ | ||
applyAtProcessCreation?: boolean; | ||
|
||
/** | ||
* Apply to the environment in the shell integration script. Note that this _will not_ apply | ||
* the mutator if shell integration is disabled or not working for some reason. | ||
* | ||
* Defaults to false. | ||
*/ | ||
applyAtShellIntegration?: boolean; | ||
} | ||
|
||
/** | ||
* A type of mutation and its value to be applied to an environment variable. | ||
*/ | ||
export interface EnvironmentVariableMutator { | ||
/** | ||
* Options applied to the mutator. | ||
*/ | ||
readonly options: EnvironmentVariableMutatorOptions; | ||
} | ||
|
||
export interface EnvironmentVariableCollection extends Iterable<[variable: string, mutator: EnvironmentVariableMutator]> { | ||
/** | ||
* @param options Options applied to the mutator. | ||
*/ | ||
replace(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void; | ||
|
||
/** | ||
* @param options Options applied to the mutator. | ||
*/ | ||
append(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void; | ||
|
||
/** | ||
* @param options Options applied to the mutator. | ||
*/ | ||
prepend(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters