Skip to content

Commit 7c09bb4

Browse files
committed
docs(help): add see also for the help command
1 parent 053e389 commit 7c09bb4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

cmd/scw/testdata/test-all-usage-help-usage.golden

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Get help about how the CLI works
3+
Get help about how specific topics inside the CLI
44

55
USAGE:
66
scw help <command>
@@ -18,4 +18,8 @@ GLOBAL FLAGS:
1818
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
1919
-p, --profile string The config profile to use
2020

21+
SEE ALSO:
22+
# Print general help
23+
scw --help
24+
2125
Use "scw help [command] --help" for more information about a command.

internal/namespaces/help/custom.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ func GetCommands() *core.Commands {
1717

1818
func helpRoot() *core.Command {
1919
return &core.Command{
20-
Short: "Get help about how the CLI works",
20+
Short: "Get help about how specific topics inside the CLI",
2121
Namespace: "help",
2222
AllowAnonymousClient: true,
2323
Groups: []string{"utility"},
24+
SeeAlsos: []*core.SeeAlso{
25+
{
26+
Short: "Print general help",
27+
Command: "scw --help",
28+
},
29+
},
2430
}
2531
}
2632

0 commit comments

Comments
 (0)