Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: help command spacing when scriptName is empty (#1994)
  • Loading branch information
CupOfTea696 committed Aug 16, 2021
1 parent 8f77414 commit d33e997
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/usage.ts
Expand Up @@ -246,8 +246,10 @@ export function usage(yargs: YargsInstance, shim: PlatformShim) {
commands = commands.sort((a, b) => a[0].localeCompare(b[0]));
}

const prefix = base$0 ? `${base$0} ` : '';

commands.forEach(command => {
const commandString = `${base$0} ${parentCommands}${command[0].replace(
const commandString = `${prefix}${parentCommands}${command[0].replace(
/^\$0 ?/,
''
)}`; // drop $0 from default commands.
Expand Down

0 comments on commit d33e997

Please sign in to comment.