Skip to main content

Module fish

Module fish 

Source
Expand description

Fish history (fish_history).

A “nearly-YAML” record list (fish src/history/yaml_backend.rs): each entry is - cmd: <text>, when: <epoch>, and an optional paths: block of - <path> lines. The cmd value can contain literal : and #, so it is NOT valid YAML — parse by line prefix. Fish escapes EXACTLY two things in cmd: \\\ and newline → \n; decoding reverses only those.

Functions§

parse
Parse fish history bytes into entries.
unescape
Reverse fish’s two-rule escaping: \\\, \n → newline. No other escape exists, so a lone backslash before any other char is kept verbatim.