import type { SessionView } from '../../../../ops/types.ts'; import type { Session } from '../../../session/session.ts'; import type { BuiltinCall, Result } from '../types.ts'; /** * Print formatted output, honoring GNU printf's format-reuse rules. * * Supports `%s %c %b %q`, the integer conversions `%d %i %o %u %x %X`, * the float conversions `%f %F %e %E %g %G %a %A`, and `%%`, with * `- + 0 # (space)` flags, numeric or `*` width/precision, and backslash * escapes (including `\u`/`\U`) interpreted once in the same scan. When * arguments remain after one pass the format is reused until they are * exhausted; a missing argument renders as the empty string / `0`. * Integers wrap at 64 bits; `%a` formats at IEEE double precision. The * conversion engine itself lives in `format.ts`. * * With `-v NAME` the formatted text is stored in the shell variable * `NAME` (or the array element `NAME[idx]`) instead of written to * stdout, matching GNU printf. An unusable `NAME` is rejected before the * format runs (status 2); a readonly name or an out-of-range subscript * still reports the format's own errors first, then fails with status 1 * and leaves the variable untouched. */ export declare function handlePrintf(args: string[], session: Session, view?: SessionView): Promise; /** The `printf` arm. */ export declare function printfBuiltin(call: BuiltinCall): Promise; //# sourceMappingURL=printf.d.ts.map