tmux.ts - v0.1.3
    Preparing search index...

    Variable newSessionConst

    newSession: (
        ...args: [
            shellCommand: string,
            options: {
                detached: true;
                environment?: string;
                format?: string;
                height?: number
                | "-";
                noUpdateEnvironment?: boolean;
                print?: boolean;
                sessionName?: string;
                startDirectory?: string;
                targetSession?: string;
                width?: number | "-";
                windowName?: string;
            },
        ],
    ) => Effect<
        string,
        TmuxCommandOptionsError
        | TmuxProcessRunError,
        TmuxProcess,
    > = ...

    Create a new tmux session (tmux new-session). Starts the server if none is running.

    Type Declaration

      • (
            ...args: [
                shellCommand: string,
                options: {
                    detached: true;
                    environment?: string;
                    format?: string;
                    height?: number
                    | "-";
                    noUpdateEnvironment?: boolean;
                    print?: boolean;
                    sessionName?: string;
                    startDirectory?: string;
                    targetSession?: string;
                    width?: number | "-";
                    windowName?: string;
                },
            ],
        ): Effect<
            string,
            TmuxCommandOptionsError
            | TmuxProcessRunError,
            TmuxProcess,
        >
      • Parameters

        • ...args: [
              shellCommand: string,
              options: {
                  detached: true;
                  environment?: string;
                  format?: string;
                  height?: number
                  | "-";
                  noUpdateEnvironment?: boolean;
                  print?: boolean;
                  sessionName?: string;
                  startDirectory?: string;
                  targetSession?: string;
                  width?: number | "-";
                  windowName?: string;
              },
          ]

        Returns Effect<string, TmuxCommandOptionsError | TmuxProcessRunError, TmuxProcess>

        The -P formatted line when { print: true }, otherwise an empty string.

    await tmux.newSession(undefined, { sessionName: "work", detached: true });

    const name = await tmux.newSession("htop", { sessionName: "mon", detached: true, print: true });