From 9bb70217f8c1e710aff16a082acbfa94d6d61ba2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 15 Jan 2023 15:23:06 +0100 Subject: [PATCH] Add extra newline after additionalHelp output The additionalHelp message is printed at the end of the --help output; To get more help with docker, check out our guides at https://docs.docker.com/go/guides/ PS> As this message may contain an URL, users may copy/paste the URL to open it in their browser, but can easily end up copying their prompt (as there's no whitespace after it), and as a result end up on a broken URL, for example: https://docs.docker.com/go/guides/PS This patch adds an extra newline at the end to provide some whitespace around the message, making it less error-prone to copy the URL; To get more help with docker, check out our guides at https://docs.docker.com/go/guides/ PS> Signed-off-by: Sebastiaan van Stijn --- cli/cobra.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/cobra.go b/cli/cobra.go index 34563669b6..1b07fc5648 100644 --- a/cli/cobra.go +++ b/cli/cobra.go @@ -511,6 +511,7 @@ Run '{{.CommandPath}} COMMAND --help' for more information on a command. {{- if hasAdditionalHelp .}} {{ additionalHelp . }} + {{- end}} `