diff --git a/lib/cli/command.js b/lib/cli/command.js index 9bc27a0..57188b8 100644 --- a/lib/cli/command.js +++ b/lib/cli/command.js @@ -132,12 +132,12 @@ class Command { // default value _.forEach(this.supportedFlags, (flag, name)=> { - if(!_.has(newFlags, name)){ + if (!_.has(newFlags, name)) { newFlags[name] = flag.defaultValue; } }); _.forEach(this.supportedGlobalFlags, (flag, name)=> { - if(!_.has(newFlags, name)){ + if (!_.has(newFlags, name)) { newFlags[name] = flag.defaultValue; } }); @@ -164,7 +164,10 @@ Usage: Not supported Available Commands: - Not supported + ${_.map(this.subCommands, (cmd)=> { + // pad the command name for better output + return `${_.padEnd(cmd.name, 10)} ${cmd.description}`; + }).join('\n')} Flags: Not supported