pub fn expand_path(raw: &str, ssh_dir: &Path) -> PathBufExpand description
Expand a path that may start with ~ or be relative.
Handles the common SSH config path expansion logic:
~/pathexpands to$HOME/path- bare
~expands to$HOME - Relative paths are resolved against
ssh_dir - Absolute paths are returned as-is
When dirs::home_dir() returns None, ~/ and bare ~ paths are
returned unchanged as a PathBuf.