plenary.nvim
plenary.nvim copied to clipboard
Path:normalize appears to be reducing paths to their relative (without cwd) value
This may not be a bug, but it does seem incorrect. If you provide an absolute path (as a string) to Path:normalize, you will receive the file/dir name itself and nothing else. I am not entirely sure the reasoning for this (The code for this function is easy enough but I assume this is being done for a reason).
An example of this is as follows
print(require("plenary.path"):new("/tmp/testing.py"):normalize("/tmp"))
This will print out
testing.py, when it I would assume it would print out /tmp/testing.py. Is this just a misunderstanding on my part?