mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00:00
realpath: improve usage description for --relative-{to,base}
* src/realpath.c (usage): Explicitly say 'DIR' instead of 'FILE' for
--relative-{to,base} parameters, to avoid giving the impression
that regular files can be used as relative base.
* doc/coreutils.texi (realpath): Same.
This commit is contained in:
parent
ac2eebc224
commit
65b7bf790c
@ -14113,22 +14113,22 @@ This is the default mode of operation.
|
||||
@opindex --quiet
|
||||
Suppress diagnostic messages for specified file names.
|
||||
|
||||
@item --relative-to=@var{file}
|
||||
@item --relative-to=@var{dir}
|
||||
@opindex --relative-to
|
||||
@cindex relpath
|
||||
Print the resolved file names relative to the specified file.
|
||||
Print the resolved file names relative to the specified directory.
|
||||
Note this option honors the @option{-m} and @option{-e} options
|
||||
pertaining to file existence.
|
||||
|
||||
@item --relative-base=@var{base}
|
||||
@item --relative-base=@var{dir}
|
||||
@opindex --relative-base
|
||||
This option is valid when used with @option{--relative-to}, and will restrict
|
||||
the output of @option{--relative-to} so that relative names are output,
|
||||
only when @var{file}s are descendants of @var{base}. Otherwise output the
|
||||
only when @var{file}s are descendants of @var{dir}. Otherwise output the
|
||||
absolute file name. If @option{--relative-to} was not specified, then
|
||||
the descendants of @var{base} are printed relative to @var{base}. If
|
||||
the descendants of @var{dir} are printed relative to @var{dir}. If
|
||||
@option{--relative-to} is specified, then that directory must be a
|
||||
descendant of @var{base} for this option to have an effect.
|
||||
descendant of @var{dir} for this option to have an effect.
|
||||
Note: this option honors the @option{-m} and @option{-e}
|
||||
options pertaining to file existence. For example:
|
||||
|
||||
|
||||
@ -81,8 +81,8 @@ all but the last component must exist\n\
|
||||
-L, --logical resolve '..' components before symlinks\n\
|
||||
-P, --physical resolve symlinks as encountered (default)\n\
|
||||
-q, --quiet suppress most error messages\n\
|
||||
--relative-to=FILE print the resolved path relative to FILE\n\
|
||||
--relative-base=FILE print absolute paths unless paths below FILE\n\
|
||||
--relative-to=DIR print the resolved path relative to DIR\n\
|
||||
--relative-base=DIR print absolute paths unless paths below DIR\n\
|
||||
-s, --strip, --no-symlinks don't expand symlinks\n\
|
||||
-z, --zero end each output line with NUL, not newline\n\
|
||||
\n\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user