Expand description
Shared tool helpers: path resolution and display.
Functions§
- display_
path - Stringify a path for display given the raw (possibly relative) input.
- expand_
tilde - Expand a leading
~to the user’s home directory. - resolve_
read_ path - Alias mirroring pi’s
resolveReadPath(same semantics asresolveToCwd). - resolve_
to_ cwd - Resolve a tool-provided path against the working directory. Absolute paths
(and
~-expanded paths) are used as-is; relative paths are joined tocwd. - shorten_
path - Render a path compactly: relative to
cwdwhen inside it, otherwise~- abbreviated when inside the home dir.