From: Pádraig Brady Date: Thu, 29 Jul 2021 12:19:33 +0000 (+0100) Subject: doc: add options summary list to tr texinfo X-Git-Tag: v9.0~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1316583b287eff7cb56efec186d6df9b61da078;p=thirdparty%2Fcoreutils.git 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 --- 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