GNU bug report logs - #51311
[PATCH] echo: update --help to document edge cases

Previous Next

Package: coreutils;

Reported by: Florent Flament <contact <at> florentflament.com>

Date: Thu, 21 Oct 2021 02:14:01 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 51311-done <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Florent Flament <contact <at> florentflament.com>,
 Pádraig Brady <P <at> draigBrady.com>
Cc: 51311-done <at> debbugs.gnu.org, bob <at> proulx.com
Subject: Re: bug#51311: [PATCH] echo: update --help to document edge cases
Date: Thu, 21 Oct 2021 22:54:08 +0200
On 10/21/21 15:14, Florent Flament wrote:
> Pádraig Brady <P <at> draigBrady.com> writes:
>> +NOTE: printf(1) is a preferred alternative, with more standard option handling.\

> I believe that it misses the point. It is still not clear that the echo
> command doesn't behave as one would expect for a few edge cases.
> 
> Maybe something like this would be closer to what I'm trying to express:
> 
> NOTE: printf(1) is a preferred alternative, which doesn't share echo's
> inability to handle edge cases.

I'm not sure that just mentioning "edge cases" will remind people either
that they are falling into such particular edge case.

Therefore, I'd prefer Padraig's shorter sentence: it expresses the matter
positively while the latter proposal tries to explain via negative wording.

If we want to be more explicit, then we'd have to name examples where
printf(1) is superior to echo(1) - or the shell's echo builtin.
But IMO the whole point is two-fold: if someone doesn't have enough experience
to understand the edge cases, then eventually the usage of printf with the
often complex format specifiers is also too much.
Finally, I think Padraig's suggestion had the best tradeoff between pointing
out the matter and getting too much into details.

Have a nice day,
Berny




This bug report was last modified 3 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.