Theia API Documentation v1.65.0
    Preparing search index...

    Options to create terminal widget.

    interface TerminalOptions {
        attributes?: { [key: string]: null | string };
        color?: ThemeColor;
        cwd?: string | Uri;
        env?: { [key: string]: null | string };
        hideFromUser?: boolean;
        iconPath?: IconPath;
        isTransient?: boolean;
        location?:
            | TerminalLocation
            | TerminalEditorLocationOptions
            | TerminalSplitLocationOptions;
        message?: string;
        name?: string;
        shellArgs?: string
        | string[];
        shellIntegrationNonce?: string;
        shellPath?: string;
        strictEnv?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    attributes?: { [key: string]: null | string }

    Terminal attributes. Can be useful to apply some implementation specific information.

    color?: ThemeColor

    The icon ThemeColor for the terminal. The terminal.ansi* theme keys are recommended for the best contrast and consistency across themes.

    cwd?: string | Uri

    Current working directory.

    env?: { [key: string]: null | string }

    Environment variables for terminal in format key - value.

    hideFromUser?: boolean

    When enabled the terminal will run the process as normal but not be surfaced to the user until Terminal.show is called. The typical usage for this is when you need to run something that may need interactivity but only want to tell the user about it when interaction is needed. Note that the terminals will still be exposed to all extensions as normal.

    iconPath?: IconPath

    The icon path or ThemeIcon for the terminal.

    isTransient?: boolean

    Opt-out of the default terminal persistence on restart and reload. This will only take effect when terminal.integrated.enablePersistentSessions is enabled.

    message?: string

    A message to write to the terminal on first launch. Note that this is not sent to the process, but rather written directly to the terminal. This supports escape sequences such as setting text style.

    name?: string

    Human readable representation of the terminal in the UI.

    shellArgs?: string | string[]

    Args for the custom shell executable. A string can be used on Windows only which allows specifying shell args in command-line format.

    shellIntegrationNonce?: string

    The nonce to use to verify shell integration sequences are coming from a trusted source. An example impact of UX of this is if the command line is reported with a nonce, it will not need to verify with the user that the command line is correct before rerunning it via the shell integration command decoration.

    This should be used if the terminal includes custom shell integration support. It should be set to a random GUID which will then set the VSCODE_NONCE environment variable. Inside the shell, this should then be removed from the environment so as to protect it from general access. Once that is done it can be passed through in the relevant sequences to make them trusted.

    shellPath?: string

    Path to the executable shell. For example "/bin/bash", "bash", "sh".

    strictEnv?: boolean

    Whether the terminal process environment should be exactly as provided in TerminalOptions.env. When this is false (default), the environment will be based on the window's environment and also apply configured platform settings like terminal.integrated.windows.env on top. When this is true, the complete environment must be provided as nothing will be inherited from the process or any configuration.