From 195e943be732d1d1fe5576786596b49be409f1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 12 Feb 2022 18:43:25 +0000 Subject: [PATCH 5/5] doc: avoid using "[" is URLS in --help output * src/system.h (emit_ancillary_info): While supported if entered manually, the "[" character is not highlighted as part of a URL by default in terminals, so avoid using it. Addresses https://bugs.gnu.org/53946 --- src/system.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/system.h b/src/system.h index 08cfd3bc0..09498a172 100644 --- a/src/system.h +++ b/src/system.h @@ -716,8 +716,12 @@ emit_ancillary_info (char const *program) fputs (_("Report any translation bugs to " "\n"), stdout); } + /* .htaccess on the coreutils web site maps programs to the appropriate page, + however we explicitly handle "[" -> "test" here as the "[" is not + recognized as part of a URL by default in terminals. */ + char const *url_program = STREQ (program, "[") ? "test" : program; printf (_("Full documentation <%s%s>\n"), - PACKAGE_URL, program); + PACKAGE_URL, url_program); printf (_("or available locally via: info '(coreutils) %s%s'\n"), node, node == program ? " invocation" : ""); } -- 2.26.2