Skip to content

Commit 53f22b6

Browse files
author
Mizunashi Mana
committed
add special boolean option support
1 parent ab968d5 commit 53f22b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/commands.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ function help(commands) {
2929
if (after.length > 0) after = "("+after.join("; ")+")";
3030
else after = "";
3131

32-
indent_output(2, '--' + option.name, option.description + ' ' + after);
32+
var optname = '--';
33+
if (typeof option.defaults === 'boolean') optname += '[no-]';
34+
optname += option.name;
35+
indent_output(2, optname, option.description + ' ' + after);
3336
});
3437
console.log('');
3538
});

0 commit comments

Comments
 (0)