mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
builtin realpath: Add --no-symlinks option
Taken from GNU realpath, this one makes realpath not resolve symlinks. It still makes paths absolute and handles duplicate and trailing slashes. (useful in fish_add_path)
This commit is contained in:
@@ -15,6 +15,10 @@ Description
|
||||
|
||||
``realpath`` resolves a path to its absolute path.
|
||||
|
||||
fish provides a ``realpath`` builtin as a fallback for systems where there is no ``realpath`` command. fish's implementation always resolves its first argument, and does not support any options.
|
||||
fish provides a ``realpath`` builtin as a fallback for systems where there is no ``realpath`` command, your OS might provide a version with more features.
|
||||
|
||||
If the operation fails, an error will be reported.
|
||||
If a ``realpath`` command exists, it will be preferred, so if you want to use the builtin you should use ``builtin realpath`` explicitly.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- ``-s`` or ``--no-symlink``: Don't resolve symlinks, only make paths absolute, squash multiple slashes and remove trailing slashes.
|
||||
|
||||
Reference in New Issue
Block a user