@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
14 lines • 701 B
TypeScript
/**
* Process C-style escape sequences for `echo -e`.
*
* Single-pass to handle `\\` correctly (`\\b` → a literal `\b`). Supports
* `\\ \n \t \r \a \b \f \v`, `\e` and `\E` (ESC), `\xHH` (a byte),
* `\uHHHH` and `\UHHHHHHHH` (a code point), `\0NNN` (octal) and `\c`
* (stop output); an unknown escape like `\z` passes through as `\z`.
* Returns the text and whether `\c` stopped the output, which also drops
* echo's newline. `tr` has its own reader
* (`commands/builtin/utils/escapes.ts`) because only the shell writes
* bytes: `\xHH` here names a byte, not a code point.
*/
export declare function interpretEscapes(text: string): [string, boolean];
//# sourceMappingURL=escapes.d.ts.map