/** * One word of a line as the gate reads it: `raw` as typed, `text` what * it names before expansion (quotes removed, escapes resolved), null * when only the runtime can say (a parameter or command substitution, * a brace expansion). */ export interface Word { readonly raw: string; readonly text: string | null; } /** The text the gate works with: the literal when it has one, the word as typed otherwise. */ export declare function wordValue(word: Word): string; /** * A line a command runs on the words it was given. Exactly one shape * applies. `line` is text the runtime parses afresh (`eval`'s joined * words, `sh -c`'s program, `mapfile -C`'s callback); `argv` is a * command already split into words (`command`, `exec`, `env`, * `timeout`, `xargs`, `find -exec`, `nohup`, `nice`, `time`); neither * is a line the gate cannot read at all (a sourced file, a script, a * program from stdin). `open` says the runtime appends operands the * gate cannot read (`xargs`'s items, `find`'s `{}` paths). */ export interface InnerLine { readonly line: string | null; readonly argv: readonly Word[]; readonly open: boolean; } /** Whether the gate can read what runs. */ export declare function innerReadable(inner: InnerLine): boolean; /** * The lines a command runs on the words it was given, for the words * that run other words. * * The table is the workspace shell's own re-dispatchers (every builtin * that hands a constructed line back to the evaluator: `eval`, `source`, * `command`, `env`, `timeout`, `xargs`, `mapfile -C`, `sh`/`bash`, an * executed path) plus the classic prefix runners a real shell has and * the workspace shell does not (`builtin`, `exec`, `nohup`, `nice`, * `time`, `find -exec`). A whole-line runtime is a real shell, so * anything else that * can run a command (an interpreter's `-c`, `make`, `git` hooks) is the * runtime's own world: the allow list is the closed form there. */ export declare function innerLines(head: string, args: readonly Word[]): InnerLine[]; //# sourceMappingURL=inner_lines.d.ts.map