[git commit] less: accept/ignore -T TAGFILE

Denys Vlasenko vda.linux at googlemail.com
Sun Oct 11 13:52:33 UTC 2026


commit: https://git.busybox.net/busybox/commit/?id=1c7e871e0a664afb0c8ef1037eeeb4abb818f3f1
branch: https://git.busybox.net/busybox/log/?h=master

Patch by Sören Tempel <soeren at soeren-tempel.net>

This option is passed by mandoc(1), while we don't implement the
actual functionality here, this patch allows using tagfile support
with mandoc(1) when a more feature-full less(1) implementation is
installed.

Otherwise, we would have to detect support for -T option in the
pager at run-time in mandoc(1), which would occur run-time costs.
Note that other option (-s and -X) are already ignored by BusyBox
less(1), so this seems like a good solution for mandoc(1) compat.

function                                             old     new   delta
less_main                                           2062    2064      +2
.rodata                                           104845  104847      +2

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 miscutils/less.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/miscutils/less.c b/miscutils/less.c
index 0771ff68f..f5f3afbed 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -1852,7 +1852,9 @@ int less_main(int argc, char **argv)
 	getopt32(argv, "EMmN~IF"
 		IF_FEATURE_LESS_TRUNCATE("S")
 		IF_FEATURE_LESS_RAW("R")
-		/*ignored:*/"sX"
+		/*-T TAGFILE: ignored, for compatibility with mandoc*/ "T:"
+		/*ignored:*/"sX",
+		NULL
 	);
 	argv += optind;
 	num_files = argc - optind;


More information about the busybox-cvs mailing list