(38 lines)
1 '\" t2 .\" Copyright (c) 2025 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH Path.expand_home 3 2025-11-29 "Tomo man-pages"6 .SH NAME7 Path.expand_home \- expand ~ to $HOME8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI Path.expand_home\ :\ func(path:\ Path\ ->\ Path)13 .fi14 .SH DESCRIPTION15 For home-based paths (those starting with `~`), expand the path to replace the tilde with and absolute path to the user's `$HOME` directory.18 .SH ARGUMENTS20 .TS21 allbox;22 lb lb lbx23 l l l.24 Name Type Description25 path Path The path to expand.26 .TE27 .SH RETURN28 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.30 .SH EXAMPLES31 .EX32 # Assume current user is 'user'33 assert (~/foo).expand_home() == (/home/user/foo)34 # No change35 assert (/foo).expand_home() == (/foo)36 .EE37 .SH SEE ALSO38 .BR Tomo-Path (3)