aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-13 17:14:50 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-28 16:03:27 -0700
commit6c329e8a839c1b5eeaf2e545b4f4084c3a8830f7 (patch)
tree65597d006e0cd94e9f74b95b67c75451b2daecd8 /doc_src
parent5fa8370c133738aa21a3b4a7d3a89f9188068498 (diff)
provide a realpath implementation
Not all distros have a `realpath` command. Provide a function that uses the real command if available else use the fish builtin. Fixes #2932
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/fish_realpath.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc_src/fish_realpath.txt b/doc_src/fish_realpath.txt
new file mode 100644
index 00000000..a2ba0d0f
--- /dev/null
+++ b/doc_src/fish_realpath.txt
@@ -0,0 +1,13 @@
+\section fish_realpath fish_realpath - Convert a path to an absolute path without symlinks
+
+\subsection fish_realpath-synopsis Synopsis
+\fish{synopsis}
+fish_realpath path
+\endfish
+
+\subsection fish_realpath-description Description
+
+This is an implementation of the external realpath command that doesn't support any options. It's meant to be used only by scripts which need to be portable. In general scripts shouldn't invoke this directly. They should just use `realpath` which will fallback to this builtin if an external command cannot be found.
+
+If the path is invalid no translated path will be written to stdout and an error will be reported.
+This implementation behaves like the GNU command being invoked with `--canonicalize-existing`.