Skip to main content

Module path

Module path 

Source
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 when HOME is 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 when home is None. The pure shape keeps it testable without touching the process environment.