]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
realpath: improve usage description for --relative-{to,base}
authorAssaf Gordon <assafgordon@gmail.com>
Sat, 24 Jun 2017 23:47:26 +0000 (19:47 -0400)
committerPádraig Brady <P@draigBrady.com>
Tue, 29 Aug 2017 06:22:28 +0000 (23:22 -0700)
* 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.

doc/coreutils.texi
src/realpath.c

index 8f1cb4c5f9d553e499183c65a2f2ad5a503db6d9..06d065940591aece37db394a2a2094f97f652820 100644 (file)
@@ -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:
 
index 92d88c5a420c7d86e2cf2aea69b27aef16d26683..d4c159573d0d5cd24ea3be20ded9c932c44e175c 100644 (file)
@@ -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\