pub fn expand_tilde_env(path: &str) -> PathBuf
Expand a leading ~/~/ in path against $HOME, read from the process environment. A path without a tilde segment — or when $HOME is unset — passes through unchanged.
~
~/
path
$HOME