mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
f7f39b8c90
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
12 lines
802 B
Text
12 lines
802 B
Text
\section realpath realpath - Convert a path to an absolute path without symlinks
|
|
|
|
\subsection realpath-synopsis Synopsis
|
|
\fish{synopsis}
|
|
realpath path
|
|
\endfish
|
|
|
|
\subsection realpath-description Description
|
|
|
|
This is implemented as a function and a builtin. The function will attempt to use an external realpath command if one can be found. Otherwise it falls back to the builtin. The builtin does not support any options. It's meant to be used only by scripts which need to be portable. The builtin implementation behaves like GNU realpath when invoked without any options (which is the most common use case). In general scripts should not invoke the builtin directly. They should just use `realpath`.
|
|
|
|
If the path is invalid no translated path will be written to stdout and an error will be reported.
|