EnvironmentVariableCollection

A collection of mutations that an extension can apply to a process environment.

Online Documentation

Inheritors

Properties

Link copied to clipboard
abstract var description: JsAny?

A description for the environment variable collection, this will be used to describe the changes in the UI.

Link copied to clipboard
abstract var persistent: Boolean

Whether the collection should be cached for the workspace and applied to the terminal across window reloads. When true the collection will be active immediately such when the window reloads. Additionally, this API will return the cached version if it exists. The collection will be invalidated when the extension is uninstalled or when the collection is cleared. Defaults to true.

Functions

Link copied to clipboard
abstract fun append(variable: String, value: String, options: EnvironmentVariableMutatorOptions = definedExternally)

Append a value to an environment variable.

Link copied to clipboard
abstract fun clear()

Clears all mutators from this collection.

Link copied to clipboard
abstract fun delete(variable: String)

Deletes this collection's mutator for a variable.

Link copied to clipboard
abstract fun forEach(callback: (variable: String, mutator: EnvironmentVariableMutator, collection: EnvironmentVariableCollection) -> Unit, thisArg: JsAny? = definedExternally)

Iterate over each mutator in this collection.

Link copied to clipboard

abstract fun get(variable: String): EnvironmentVariableMutator?

Gets the mutator that this collection applies to a variable, if any.

Link copied to clipboard
abstract fun prepend(variable: String, value: String, options: EnvironmentVariableMutatorOptions = definedExternally)

Prepend a value to an environment variable.

Link copied to clipboard
abstract fun replace(variable: String, value: String, options: EnvironmentVariableMutatorOptions = definedExternally)

Replace an environment variable with a value.