@ac-essentials/misc-util
    Preparing search index...

    Variable escapeCommandArgConst

    escapeCommandArg: (expr: string) => string = ...

    Escape a string to be safely used as a shell argument, depending on the current platform (POSIX-compliant shell or Windows cmd.exe).

    On POSIX, it adds single quotes around a string and quotes/escapes any existing single quotes. On Windows, it adds double quotes around a string and escapes any existing problematic characters (such as %, !, and ") by replacing them with spaces. Backslashes are escaped by doubling them.

    Type Declaration

      • (expr: string): string
      • Parameters

        • expr: string

          The string to escape

        Returns string

        The escaped string