Skip to content

Commit d4c51e5

Browse files
committed
feat(plugin-help): dim cli name
1 parent 094b85d commit d4c51e5

3 files changed

Lines changed: 278 additions & 278 deletions

File tree

packages/clerc/test/__snapshots__/clerc.test.ts.snap

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,73 +3,73 @@
33
exports[`clerc > should install plugins 1`] = `
44
[
55
[
6-
"[32mtest[39m [33mv0.0.0[39m [33m-[39m test
6+
"[1mtest[22m v0.0.0 - test
77
8-
[1mUsage[22m
9-
[35m$ test <command> [flags][39m
8+
[4m[1mUsage[22m[24m
9+
$ test <command> [flags]
1010
11-
[1mGlobal Flags[22m
12-
[34m--version, -V[39m [90mBoolean[39m Prints current version [90m[default: false][39m
13-
[34m--help, -h[39m [90mBoolean[39m Show help [90m[default: false][39m
11+
[4m[1mGlobal Flags[22m[24m
12+
[1m--version, -V[22m [2mBoolean[22m Prints current version [2m[default: [1mfalse[22m[2m][22m
13+
[1m--help, -h[22m [2mBoolean[22m Show help [2m[default: [1mfalse[22m[2m][22m
1414
15-
[1mCommands[22m
16-
[36mversion[39m Prints current version
17-
[36mhelp[39m Show help
15+
[4m[1mCommands[22m[24m
16+
[1mversion[22m Prints current version
17+
[1mhelp[22m Show help
1818
19-
[1mExamples[22m
20-
$ test help [33m-[39m Show help
21-
$ test help <command> [33m-[39m Show help for a specific command
22-
$ test <command> --help [33m-[39m Show help for a specific command
19+
[4m[1mExamples[22m[24m
20+
$ test help - Show help
21+
$ test help <command> - Show help for a specific command
22+
$ test <command> --help - Show help for a specific command
2323
24-
[1mNotes[22m
24+
[4m[1mNotes[22m[24m
2525
If no command is specified, show help for the CLI.
2626
If a command is specified, show help for the command.
2727
-h is an alias for --help.",
2828
],
2929
[
30-
"[32mtest[39m [33mv0.0.0[39m [33m-[39m test
30+
"[1mtest[22m v0.0.0 - test
3131
32-
[1mUsage[22m
33-
[35m$ test <command> [flags][39m
32+
[4m[1mUsage[22m[24m
33+
$ test <command> [flags]
3434
35-
[1mGlobal Flags[22m
36-
[34m--version, -V[39m [90mBoolean[39m Prints current version [90m[default: false][39m
37-
[34m--help, -h[39m [90mBoolean[39m Show help [90m[default: false][39m
35+
[4m[1mGlobal Flags[22m[24m
36+
[1m--version, -V[22m [2mBoolean[22m Prints current version [2m[default: [1mfalse[22m[2m][22m
37+
[1m--help, -h[22m [2mBoolean[22m Show help [2m[default: [1mfalse[22m[2m][22m
3838
39-
[1mCommands[22m
40-
[36mversion[39m Prints current version
41-
[36mhelp[39m Show help
39+
[4m[1mCommands[22m[24m
40+
[1mversion[22m Prints current version
41+
[1mhelp[22m Show help
4242
43-
[1mExamples[22m
44-
$ test help [33m-[39m Show help
45-
$ test help <command> [33m-[39m Show help for a specific command
46-
$ test <command> --help [33m-[39m Show help for a specific command
43+
[4m[1mExamples[22m[24m
44+
$ test help - Show help
45+
$ test help <command> - Show help for a specific command
46+
$ test <command> --help - Show help for a specific command
4747
48-
[1mNotes[22m
48+
[4m[1mNotes[22m[24m
4949
If no command is specified, show help for the CLI.
5050
If a command is specified, show help for the command.
5151
-h is an alias for --help.",
5252
],
5353
[
54-
"[32mtest[39m [33mv0.0.0[39m [33m-[39m test
54+
"[1mtest[22m v0.0.0 - test
5555
56-
[1mUsage[22m
57-
[35m$ test <command> [flags][39m
56+
[4m[1mUsage[22m[24m
57+
$ test <command> [flags]
5858
59-
[1mGlobal Flags[22m
60-
[34m--version, -V[39m [90mBoolean[39m Prints current version [90m[default: false][39m
61-
[34m--help, -h[39m [90mBoolean[39m Show help [90m[default: false][39m
59+
[4m[1mGlobal Flags[22m[24m
60+
[1m--version, -V[22m [2mBoolean[22m Prints current version [2m[default: [1mfalse[22m[2m][22m
61+
[1m--help, -h[22m [2mBoolean[22m Show help [2m[default: [1mfalse[22m[2m][22m
6262
63-
[1mCommands[22m
64-
[36mversion[39m Prints current version
65-
[36mhelp[39m Show help
63+
[4m[1mCommands[22m[24m
64+
[1mversion[22m Prints current version
65+
[1mhelp[22m Show help
6666
67-
[1mExamples[22m
68-
$ test help [33m-[39m Show help
69-
$ test help <command> [33m-[39m Show help for a specific command
70-
$ test <command> --help [33m-[39m Show help for a specific command
67+
[4m[1mExamples[22m[24m
68+
$ test help - Show help
69+
$ test help <command> - Show help for a specific command
70+
$ test <command> --help - Show help for a specific command
7171
72-
[1mNotes[22m
72+
[4m[1mNotes[22m[24m
7373
If no command is specified, show help for the CLI.
7474
If a command is specified, show help for the command.
7575
-h is an alias for --help.",

packages/plugin-help/src/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class HelpRenderer {
141141
? ` ${yc.bold(command.name)}`
142142
: "";
143143
const headerLine = command
144-
? `${_name}${formattedCommandName}`
144+
? `${yc.dim(_name)}${formattedCommandName}`
145145
: `${yc.bold(_name)} ${formatVersion(_version)}`;
146146
const alias = command?.alias
147147
? `Alias${toArray(command.alias).length > 1 ? "es" : ""}: ${toArray(

0 commit comments

Comments
 (0)