← Commit list

00f0ef4a0

Denys Vlasenko
Denys Vlasenko
2009-10-29
FAILED Duration: 26s

Subject

echo et al: support \e escape

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/process_escape_sequence.c+4 -3
@@ -20,10 +20,11 @@ char FAST_FUNC bb_process_escape_sequence(const char **ptr)
{
/* bash builtin "echo -e '\ec'" interprets \e as ESC,
* but coreutils "/bin/echo -e '\ec'" does not.
- * manpages tend to support coreutils way. */
+ * manpages tend to support coreutils way.
+ * Update: coreutils added support for \e on 28 Oct 2009. */
static const char charmap[] ALIGN1 = {
- 'a', 'b', /*'e',*/ 'f', 'n', 'r', 't', 'v', '\\', 0,
- '\a', '\b', /*27,*/ '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
+ 'a', 'b', 'e', 'f', 'n', 'r', 't', 'v', '\\', 0,
+ '\a', '\b', 27, '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
const char *p;
const char *q;