On 07/06/2022 13:41, наб wrote:
Package: coreutils
Version: 8.32-4.1
Severity: minor
File: /usr/bin/tr

Dear Maintainer,

The soup at the end of tr.1 (and tr --help) claims:
   -t may be used only when translating.

This is a very obvious lie:
   $ tr -tds abcd A
   aabbccddAA
   A

Of course, -t only changes anything when translating,
because heirloom tr uses separate tables for tr/-d/-s
and explicitly handles overlong set2 for squeezing,
but it can be specified whenever
(just doesn't do anything unless translating).

Fair point.
Will address this upstream in the attached.

thanks,
Pádraig
From 2616c03a616804e9832e6412474013cd2c6c339e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Sun, 19 Jun 2022 13:18:01 +0100
Subject: [PATCH] doc: tr: clarify that -t is ignored unless translating

* src/tr.c (usage): Don't say that -t is disallowed unless translating.
Reported in https://bugs.debian.org/1012447
---
 src/tr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tr.c b/src/tr.c
index e2aa33e76..59b0969d2 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -340,7 +340,7 @@ Interpreted sequences are:\n\
      fputs (_("\
 \n\
 Translation occurs if -d is not given and both STRING1 and STRING2 appear.\n\
--t may be used only when translating.  ARRAY2 is extended to length of\n\
+-t is only significant when translating.  ARRAY2 is extended to length of\n\
 ARRAY1 by repeating its last character as necessary.  Excess characters\n\
 of ARRAY2 are ignored.  Character classes expand in unspecified order;\n\
 while translating, [:lower:] and [:upper:] may be used in pairs to\n\
-- 
2.26.2

Reply via email to