Permalink
Browse files

Append default values to options help if any.

  • Loading branch information...
1 parent 58a2d75 commit 70a3edfa1cd47fdf1a849473ed33d92c480bde56 @sethyuan sethyuan committed Feb 11, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 nomnom.js
View
4 nomnom.js
@@ -375,10 +375,10 @@ ArgParser.prototype = {
if (!opt.hidden) {
str += " " + opt.string + spaces(longest - opt.string.length) + " ";
if (this._colors) {
- str += (opt.help || "").grey;
+ str += ((opt.help + (opt.default != null ? " [" + opt.default + "]" : "")) || "").grey;
}
else {
- str += (opt.help || "")
+ str += ((opt.help + (opt.default != null ? " [" + opt.default + "]" : "")) || "")
}
str += "\n";
}

0 comments on commit 70a3edf

Please sign in to comment.