Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
`fish_realpath` should behave like the `realpath` command when invoked with no options #3400
The intent when implementing
Okay, I've got an implementation that seems to mirror GNU realpath. We have two internal implementations. Which one is used depends on the autoconf HAVE_REALPATH_NULL value so I need to copy the fix to the other implementation and update unit tests. Should be ready by tomorrow evening if not this evening.
I honestly don't know other than everyone seemed to think it was a good idea at the time it was discussed and implemented. So I'm also going to fix the naming per your suggestion.
P.S., The reason this bug exists is I blindly assumed the
Can anyone explain to me why we have the autoconf HAVE_REALPATH_NULL symbol today? It was introduced ten years ago by @axel in commit 06fd1aa. That distinction between realpath(3) implementations made sense ten years ago. Today it appears that every implementation we run on supports passing NULL for the resolved_path argument.
The reason I ask is that I am reticent to duplicate the fix I mentioned above into the code for the none
Also, of course, I can merge my change that fixes the fish realpath builtin behavior on systems that do support NULL for the second argument. While not fixing it for systems that do support NULL as the second argument for realpath(3).