Expand description
The file: / text: value schemes shared by every payload-typed option.
Payload-typed options (patterns, replacements, structured values, stdin text, prose) accept a scheme prefix that says where the value comes from:
file:PATH— the value is the file’s contents, read verbatim (exact bytes, UTF-8). Afile:-sourced pattern is never promoted: its match mode defaults to literal.text:VALUE— the remainder is the literal value; the escape hatch for a payload that genuinely begins withfile:ortext:.
Only these two exact prefixes are recognised. Everything else is literal
as-is — there is no general scheme: reservation, so values like
http://… and std::fmt are unaffected.
Structs§
- Resolved
- A payload value with its origin, after scheme resolution.
Functions§
- resolve
- Resolve a raw option value through the
file:/text:schemes. - to_
find_ lines - Split a
find/anchor payload into the lines a block match anchors on:to_lines, then drop any trailing empty lines. - to_
lines - Split a payload into its lines for line-anchored matching. A single final
terminating newline ends the last line — it does not add an empty trailing
line. A trailing
\ron each line is dropped, so a CRLF-terminated payload (e.g. an anchor file saved by a Windows editor) matches LF source. An empty payload has zero lines.