Interface Shell

Interface for shell functionality

interface Shell {
    context: BoundContext;
    credentials: Credentials;
    cwd: string;
    env: Map<string, string>;
    envObject: Record<string, string>;
    id: string;
    username: string;
    attach(terminal: Terminal): void;
    clearPositionalParameters(): void;
    execute(line: string): Promise<number>;
    expandTilde(input: string): string;
    setPositionalParameters(args: string[]): void;
}

Properties

context: BoundContext

Shell context

credentials: Credentials

Current user's credentials

cwd: string

Current working directory

env: Map<string, string>

Environment variables

envObject: Record<string, string>

Environment variables as object

id: string

Shell ID

username: string

Current username

Methods

  • Expands tilde (~) to the user's home directory

    Parameters

    • input: string

      String that may contain tilde

    Returns string

    String with tilde expanded to HOME directory

  • Set positional parameters

    Parameters

    • args: string[]

      Arguments to set

    Returns void