doc: add options summary list to tr texinfo

* 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
This commit is contained in:
Pádraig Brady committed 2021-07-29 13:19:33 +01:00
1 parent dcd6e4172c
commit d1316583b2
1 file changed
+34 -5
+34 -5
View 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