'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Path.expand_home 3 2025-11-29 "Tomo man-pages" .SH NAME Path.expand_home \- expand ~ to $HOME .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Path.expand_home\ :\ func(path:\ Path\ ->\ Path) .fi .SH DESCRIPTION For home-based paths (those starting with `~`), expand the path to replace the tilde with and absolute path to the user's `$HOME` directory. .SH ARGUMENTS .TS allbox; lb lb lbx lb l l l l. Name Type Description Default path Path The path to expand. - .TE .SH RETURN If the path does not start with a `~`, then return it unmodified. Otherwise, replace the `~` with an absolute path to the user's home directory. .SH EXAMPLES .EX # Assume current user is 'user' assert (~/foo).expand_home() == (/home/user/foo) # No change assert (/foo).expand_home() == (/foo) .EE .SH SEE ALSO .BR Tomo-Path (3)