From 50395ec44cf01f8df066e50978295fe52fc22c2c Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Mon, 26 Nov 2018 16:17:12 +0800 Subject: [PATCH] fix: tweak help message --- src/Command.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Command.ts b/src/Command.ts index b48d851..1296bfb 100644 --- a/src/Command.ts +++ b/src/Command.ts @@ -154,7 +154,12 @@ export default class Command { sections.push({ title: `For more info, run any command with the \`--help\` flag`, body: config.subCommands - .map(command => ` $ ${config.bin} ${command.name} --help`) + .map( + command => + ` $ ${config.bin}${ + command.name === '' ? '' : ` ${command.name}` + } --help` + ) .join('\n') }) }