-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial impl of env var collection options
Part of #179476
- Loading branch information
Showing
7 changed files
with
101 additions
and
29 deletions.
There are no files selected for viewing
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
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
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,54 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* 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 | ||
|
||
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]> { | ||
// TODO: Uncomment when workspace/scopes is removed from the other proposal | ||
// /** | ||
// * @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; | ||
} | ||
} |