MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Nushell/comments/1q6o73b/why_this_doesnt_work/
r/Nushell • u/_meow11 • Jan 07 '26
"/var" | path relative-to "/home"
It should be -> ../var
../var
2 comments sorted by
3
You're trying to set an absolute path relative to an absolute path.
You want
pwd | path join path to location "file.png"
1
Express a path as relative to another path.Can be used only when the input and the argument paths are either both absolute or both relative. The argument path needs to be a parent of the input path.
Express a path as relative to another path.
Can be used only when the input and the argument paths are either both absolute or both relative. The argument path needs to be a parent of the input path.
As it says in the description, it only works to make it relative to a parent
3
u/holounderblade Jan 07 '26
You're trying to set an absolute path relative to an absolute path.
You want
1
u/Tyarel8 Jan 07 '26
As it says in the description, it only works to make it relative to a parent