]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: add options summary list to tr texinfo
authorPádraig Brady <P@draigBrady.com>
Thu, 29 Jul 2021 12:19:33 +0000 (13:19 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 29 Jul 2021 12:19:33 +0000 (13:19 +0100)
* doc/coreutils.texi (tr invocation): Provide a summary
list of the available options, which is useful to
provide a quick reminder for those already familiar
with the functionality of tr.
Fixes https://bugs.gnu.org/49764

doc/coreutils.texi

index 95f9466a0b99d060d2940e00ff126f3bfd021b2f..9cc14c008843c72819f7c495539aec96a3309c66 100644 (file)
@@ -6848,10 +6848,20 @@ delete characters, then squeeze repeated characters from the result.
 The @var{set1} and (if given) @var{set2} arguments define ordered
 sets of characters, referred to below as @var{set1} and @var{set2}.  These
 sets are the characters of the input that @command{tr} operates on.
-The @option{--complement} (@option{-c}, @option{-C}) option replaces
-@var{set1} with its
-complement (all of the characters that are not in @var{set1}).
 
+The program accepts the following options.  Also see @ref{Common options}.
+Options must precede operands.
+
+@table @samp
+
+@item -c
+@itemx -C
+@itemx --complement
+@opindex -c
+@opindex -C
+@opindex --complement
+This option replaces @var{set1} with its
+complement (all of the characters that are not in @var{set1}).
 Currently @command{tr} fully supports only single-byte characters.
 Eventually it will support multibyte characters; when it does, the
 @option{-C} option will cause it to complement the set of characters,
@@ -6860,8 +6870,27 @@ This distinction will matter only when some values are not characters,
 and this is possible only in locales using multibyte encodings when
 the input contains encoding errors.
 
-The program accepts the @option{--help} and @option{--version}
-options.  @xref{Common options}.  Options must precede operands.
+@item -d
+@itemx --delete
+@opindex -d
+@opindex --delete
+Delete characters in @var{set1}, do not translate
+
+@item -s
+@itemx --squeeze-repeats
+@opindex -s
+@opindex --squeeze-repeats
+Replace each sequence of a repeated character that is listed in
+the last specified @var{set}, with a single occurrence of that character.
+
+@item -t
+@itemx --truncate-set1
+@opindex -t
+@opindex --truncate-set1
+First truncate @var{set1} to length of @var{set2}.
+
+@end table
+
 
 @exitstatus