Skip to content

Commit

Permalink
add special boolean option support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizunashi Mana committed May 20, 2016
1 parent ab968d5 commit 53f22b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/commands.js
Expand Up @@ -29,7 +29,10 @@ function help(commands) {
if (after.length > 0) after = "("+after.join("; ")+")";
else after = "";

indent_output(2, '--' + option.name, option.description + ' ' + after);
var optname = '--';
if (typeof option.defaults === 'boolean') optname += '[no-]';
optname += option.name;
indent_output(2, optname, option.description + ' ' + after);
});
console.log('');
});
Expand Down

0 comments on commit 53f22b6

Please sign in to comment.