Expand description
Home-directory resolution and path expansion helpers.
These are crate-wide utilities (re-exported through crate::config for
backward compatibility): they resolve the effective home directory,
which differs from $HOME when running under sudo.
Functions§
- full_
expand - Like
shellexpand::fullbut uses the effective home for both~and$HOME. - full_
expand_ with_ home - Like
full_expandbut takes an explicit home directory instead of reading the environment. Use this when aConfigis available — pass&config.home_dirto avoid a data race in tests. - tilde_
expand - Expand a leading
~using the effective home directory instead ofHOME. Needed becausesudoresetsHOMEto/root.