[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51311: [PATCH] echo: update --help to document edge cases
From: |
Florent Flament |
Subject: |
bug#51311: [PATCH] echo: update --help to document edge cases |
Date: |
Wed, 20 Oct 2021 23:50:47 +0200 |
* src/echo.c (usage): Document edge cases when displaying arbitrary
strings with the echo command.
---
src/echo.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/echo.c b/src/echo.c
index 18513398a..73b44660b 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -78,6 +78,14 @@ If -e is in effect, the following sequences are
recognized:\n\
fputs (_("\
\\0NNN byte with octal value NNN (1 to 3 digits)\n\
\\xHH byte with hexadecimal value HH (1 to 2 digits)\n\
+"), stdout);
+ fputs (_("\
+\n\
+NOTE: The echo command doesn't behave gracefully when displaying\n\
+arbitrary strings. For example, it can't display the string \"-n\" and\n\
+requires the STRICTLY_POSIX flag to display \"-e\" or \"-E\". Therefore,\n\
+if you need to display arbitrary strings please use the printf command\n\
+instead.\n\
"), stdout);
printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
emit_ancillary_info (PROGRAM_NAME);
--
2.25.1
- bug#51311: [PATCH] echo: update --help to document edge cases,
Florent Flament <=
- bug#51311: [PATCH] echo: update --help to document edge cases, Pádraig Brady, 2021/10/21
- bug#51311: [PATCH] echo: update --help to document edge cases, Florent Flament, 2021/10/21
- bug#51311: [PATCH] echo: update --help to document edge cases, Bernhard Voelker, 2021/10/21
- bug#51311: [PATCH] echo: update --help to document edge cases, Florent Flament, 2021/10/22
- bug#51311: [PATCH] echo: update --help to document edge cases, Pádraig Brady, 2021/10/22
- bug#51311: [PATCH] echo: update --help to document edge cases, Bernhard Voelker, 2021/10/22
- bug#51311: [PATCH] echo: update --help to document edge cases, Florent Flament, 2021/10/22