Expand description
Path-string helpers shared across tear crates. Kept tiny and
dependency-free so every consumer can reuse without pulling
shellexpand or other heavy crates.
Functions§
- expand_
tilde - Convenience: expand a leading
~/to$HOME/. Returns the input unchanged when the string does not start with~/or whenHOMEis not set in the environment. Used by every tear surface that takes an operator-supplied path string (audit log path, recording dir, MCP socket, etc.). - expand_
tilde_ with_ home - Pure helper: expand a leading
~/to<home>/<rest>. Returns the input unchanged when the string doesn’t start with~/or whenhomeisNone. The pure shape keeps it testable without touching the process environment.