[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#51311: [PATCH] echo: update --help to document edge cases
From: |
Florent Flament |
Subject: |
Re: bug#51311: [PATCH] echo: update --help to document edge cases |
Date: |
Thu, 21 Oct 2021 17:01:31 +0200 |
Glenn Golden <gdg@zplane.com> writes:
> 2c: How about just adding a brief "NOTE" (or "CAVEAT") section to echo.1,
> explicitly addressing the wart and advocating for printf(1) as well?
>
> -----------------------------------------------------------------------------
> NOTE
> For historical and back-compatibility reasons, certain bare option-like
> strings cannot be emitted without setting POSIXLY_CORRECT, and the bare
> string '-n' cannot be emitted at all. Prefixing or suffixing such strings
> with quoted whitespace (e.g. ' -n') can be used as a workaround for this
> peculiarity. More generally, printf(1) is recommended as a more modern
> and flexible replacement for tasks historically performed by echo(1).
> -----------------------------------------------------------------------------
>
> Something like this seems to get the job done: Briefly states the issue,
> why it exists, provides a workaround, and cheerleads for modernization.
That is great. I would love to see this note in echo's man page.
Regards,
Florent