import { CliProcessCommand } from './cli-process-command'; /** * Splits text into words like a shell, as the browser CLI does: whitespace * separates words, quotes are removed (`"a b"` is one word `a b`), a backslash * outside quotes escapes the next character (`my\ file` -> `my file`), and * inside double quotes `\"` and `\\` are escapes. Single quotes keep their * content as is. A quote without a closing one is text. */ export declare function splitShellWords(text: string): string[]; /** * The arguments as a shell's echo prints them, as the browser CLI's own * `echo` does: quotes removed, the words joined by one space, spacing inside * quotes kept (`"a" "b"` -> `a b`). A quote without a closing one is text. */ export declare function joinShellWords(text: string): string; /** * The positional arguments of a command, unquoted: `command.positionals` as the * browser sends it, or, from clients that do not send it, `command.value` * split with the same shell rules. */ export declare function getPositionals(command: Pick): string[]; /** The positional arguments joined by one space (`base64 encode "a b"` -> `a b`); empty when there are none. */ export declare function getPositionalText(command: Pick): string; /** * Quotes a word for a command line so `splitShellWords` (and the browser CLI's * parser) reads it back unchanged: as is when it has no spaces, quotes or * special characters; in double quotes when it has no `"`; in single quotes * when it has no `'`; otherwise in double quotes with `\"` and `\\` escapes. */ export declare function quoteShellWord(value: string): string; //# sourceMappingURL=shell-words.d.ts.map