Skip to content

Add relative_path built-in function#3185

Open
hunter-hongg wants to merge 1 commit intocasey:masterfrom
hunter-hongg:master
Open

Add relative_path built-in function#3185
hunter-hongg wants to merge 1 commit intocasey:masterfrom
hunter-hongg:master

Conversation

@hunter-hongg
Copy link
Copy Markdown

Adds a new built-in function relative_path that computes a relative path from one path to another using Path::strip_prefix. This provides an OS-agnostic alternative to the relpath bash utility, which breaks on macOS.

Adds a new built-in function `relative_path` that computes a relative
path from one path to another using `Path::strip_prefix`. This provides
an OS-agnostic alternative to the `relpath` bash utility, which breaks
on macOS where bash runs as zsh.

The function handles both absolute and relative paths across all
supported platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant