Believe it or not -- I struggle to believe it myself -- we've been
ignoring tail's complaint that it doesn't know what --bytes means in the
Android CI infrastructure since at least mid-2019. (To be fair, today
wasn't the first time I'd seen that error message scroll by myself,
but it was the first time I've bothered/had time to investigate.)

Statically (via a code search), I also see references to --lines, and
toybox head already has the --bytes and --lines synonyms, so I've added
that here too, even though I haven't strictly seen anyone trying/failing
to use that personally yet.
---
 toys/posix/tail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From 32f052ab51f7c268909d1f4ccdb48f6890217fce Mon Sep 17 00:00:00 2001
From: Elliott Hughes <e...@google.com>
Date: Wed, 13 Oct 2021 14:15:57 -0700
Subject: [PATCH] tail: add the long option synonyms for -n and -c.

Believe it or not -- I struggle to believe it myself -- we've been
ignoring tail's complaint that it doesn't know what --bytes means in the
Android CI infrastructure since at least mid-2019. (To be fair, today
wasn't the first time I'd seen that error message scroll by myself,
but it was the first time I've bothered/had time to investigate.)

Statically (via a code search), I also see references to --lines, and
toybox head already has the --bytes and --lines synonyms, so I've added
that here too, even though I haven't strictly seen anyone trying/failing
to use that personally yet.
---
 toys/posix/tail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/posix/tail.c b/toys/posix/tail.c
index 0d13ab01..f34e10cc 100644
--- a/toys/posix/tail.c
+++ b/toys/posix/tail.c
@@ -6,7 +6,7 @@
  *
  * Deviations from posix: -f waits for pipe/fifo on stdin (nonblock?).
 
-USE_TAIL(NEWTOY(tail, "?fFs:c-n-[-cn][-fF]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_TAIL(NEWTOY(tail, "?fFs:c(bytes)-n(lines)-[-cn][-fF]", TOYFLAG_USR|TOYFLAG_BIN))
 
 config TAIL
   bool "tail"
-- 
2.33.0.1079.g6e70778dc9-goog

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to