diff --git a/cli.js b/cli.js index aefaef5..0aa623b 100644 --- a/cli.js +++ b/cli.js @@ -83,12 +83,13 @@ if (process.env.NODE_DISABLE_COLORS || process.env.TERM === 'dumb') { * The 'help' plugin is enabled by default. */ var enable = { - help: true, //Adds -h, --help - version: false, //Adds -v,--version => gets version by parsing a nearby package.json - status: false, //Adds -k,--no-color & --debug => display plain status messages /display debug messages - timeout: false, //Adds -t,--timeout N => timeout the process after N seconds - catchall: false, //Adds -c,--catch => catch and output uncaughtExceptions - glob: false //Adds glob matching => use cli.glob(arg) + help: true, //Adds -h, --help + version: false, //Adds -v,--version => gets version by parsing a nearby package.json + status: false, //Adds -k,--no-color & --debug => display plain status messages /display debug messages + timeout: false, //Adds -t,--timeout N => timeout the process after N seconds + catchall: false, //Adds -c,--catch => catch and output uncaughtExceptions + glob: false, //Adds glob matching => use cli.glob(arg) + suppresshelptype: false //Adds the suppression of type display in --help output } cli.enable = function (/*plugins*/) { Array.prototype.slice.call(arguments).forEach(function (plugin) { @@ -105,6 +106,9 @@ cli.enable = function (/*plugins*/) { case 'glob': cli.glob = require('glob'); break; + case 'suppresshelptype': + cli.suppresshelptype = true; + break; default: cli.fatal('Unknown plugin "' + plugin + '"'); break; @@ -617,7 +621,7 @@ cli.getUsage = function (code) { } line += ' '; - if (type) { + if (!cli.suppresshelptype && type) { if (type instanceof Array) { desc += '. VALUE must be either [' + type.join('|') + ']'; type = 'VALUE';