Skip to content

Commit b7b69e5

Browse files
[autofix.ci] apply automated fixes
1 parent d6dbc05 commit b7b69e5

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

packages/plugin-help/src/index.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,21 @@ export const helpPlugin = ({
121121
"If a command is specified, show help for the command.",
122122
flag && "-h is an alias for --help.",
123123
].filter(isTruthy);
124-
124+
125125
// Use getter to lazily evaluate examples when scriptName is available
126-
const getGeneralHelpExamples = (): [string, string][] => [
127-
command && [`$ ${cli._scriptName} help`, "Show help"],
128-
command && [
129-
`$ ${cli._scriptName} help <command>`,
130-
"Show help for a specific command",
131-
],
132-
flag && [
133-
`$ ${cli._scriptName} <command> --help`,
134-
"Show help for a specific command",
135-
],
136-
].filter(isTruthy) as [string, string][];
137-
126+
const getGeneralHelpExamples = (): [string, string][] =>
127+
[
128+
command && [`$ ${cli._scriptName} help`, "Show help"],
129+
command && [
130+
`$ ${cli._scriptName} help <command>`,
131+
"Show help for a specific command",
132+
],
133+
flag && [
134+
`$ ${cli._scriptName} <command> --help`,
135+
"Show help for a specific command",
136+
],
137+
].filter(isTruthy) as [string, string][];
138+
138139
const effectiveNotes = notes ?? generalHelpNotes;
139140
const getEffectiveExamples = () => examples ?? getGeneralHelpExamples();
140141

0 commit comments

Comments
 (0)