cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying

Also capitalises the start of all ShortHelp, allows subcommands to be hidden
with a "HIDDEN: " prefix in their ShortHelp, and adds a TS_DUMP_HELP envknob
to look at all --help messages together.

Fixes #11664

Signed-off-by: Paul Scott <paul@tailscale.com>
This commit is contained in:
Paul Scott
2024-04-04 17:06:09 +01:00
committed by Paul Scott
parent 9da135dd64
commit da4e92bf01
33 changed files with 344 additions and 262 deletions
+2 -3
View File
@@ -17,13 +17,12 @@ import (
var whoisCmd = &ffcli.Command{
Name: "whois",
ShortUsage: "whois [--json] ip[:port]",
ShortUsage: "tailscale whois [--json] ip[:port]",
ShortHelp: "Show the machine and user associated with a Tailscale IP (v4 or v6)",
LongHelp: strings.TrimSpace(`
'tailscale whois' shows the machine and user associated with a Tailscale IP (v4 or v6).
`),
UsageFunc: usageFunc,
Exec: runWhoIs,
Exec: runWhoIs,
FlagSet: func() *flag.FlagSet {
fs := newFlagSet("whois")
fs.BoolVar(&whoIsArgs.json, "json", false, "output in JSON format")