make fish's realpath compatible with GNU realpath

After implementing `builtin fish_realpath` it was noticed that it did
not behave like GNU `realpath` without options. Which is super annoying
since that was the whole point of implementing the command. Major
failure on my part since I wrote the unit tests to match the behavior of
the existing `wrealpath()` function that I simply exposed as a builtin
command. Rather than actually verifying it behaved in a manner
compatible with GNU realpath.

Also, while the decision to call the builtin `fish_realpath` seemed to
make sense at the time of the original commit further reflection has
shown that to be a silly, idiosyncratic, thing to have done. So rename
it to simply `realpath`.

Fixes 3400
This commit is contained in:
Kurtis Rader
2016-10-03 17:51:27 -07:00
parent d389b22afc
commit f7f39b8c90
11 changed files with 171 additions and 103 deletions

1
tests/realpath.err Normal file
View File

@@ -0,0 +1 @@
realpath: Invalid path: /this/better/be/an/invalid/path