From: Pádraig Brady Date: Sat, 12 Feb 2022 18:43:25 +0000 (+0000) Subject: doc: avoid using "[" is URLS in --help output X-Git-Tag: v9.1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=195e943be732d1d1fe5576786596b49be409f1aa;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/src/system.h b/src/system.h index 08cfd3bc07..09498a172b 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" : ""); }