From d1316583b287eff7cb56efec186d6df9b61da078 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Thu, 29 Jul 2021 13:19:33 +0100 Subject: [PATCH] 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 --- doc/coreutils.texi | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 95f9466a0b..9cc14c0088 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -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 -- 2.47.2