import { FlagView } from '../../spec/flag_view.ts';
import { LineFacts, PathSpec } from '../../../types.ts';
import type { CommandFnResult, Context } from '../../config.ts';
/**
 * A sed line may change files under `-i`, with a script file (its text is
 * read only when sed runs), or when its script names a `w` file, which GNU
 * opens even when it then refuses the script. The first of `operands` is
 * the script when no `-e` or `-f` gave one. Mirrors Python's `facts`.
 */
export declare function facts(fl: FlagView, operands: readonly (string | PathSpec)[]): LineFacts;
/**
 * Run sed over the resolved operands, as GNU sed 4.9. The script comes from
 * -e expressions and -f script files, compiled in option order, when any
 * were given, otherwise from the first positional operand. mirage-rs
 * compiles and runs it; every operand and every file the script names is a
 * request the host serves. Mirrors Python's sed_generic.
 */
export declare function sedGeneric(paths: PathSpec[], texts: string[], ctx: Context, stream: (p: PathSpec) => AsyncIterable<Uint8Array>): Promise<CommandFnResult>;
/**
 * When the script is supplied via -e/-f, GNU sed treats every bare argument as
 * a file. The arg parser instead routes the first bare arg into the positional
 * `text` (script) slot, so recover it as a path operand here.
 */
export declare function positionalAsPaths(texts: string[], ctx: Context): PathSpec[];
//# sourceMappingURL=sed.d.ts.map