Skip to content
Browse files

Modified option parser to properly print usage for empty short options

  • Loading branch information...
1 parent e7bc101 commit 5866c606d1bafc1340729b102784deb6d1a883fb @rinon rinon committed Aug 8, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/util.js
View
6 src/util.js
@@ -274,7 +274,11 @@
var s = spec[i];
str += indent;
if (s.name) {
- str += flushLeft("-" + s.short, 4) + flushLeft("--" + s.name, 18);
+ if (s.short) {
+ str += flushLeft("-" + s.short, 4) + flushLeft("--" + s.name, 18);
+ } else {
+ str += flushLeft("", 4) + flushLeft("--" + s.name, 18);
+ }
} else {
str += flushLeft("-" + s.short, 22);
}

0 comments on commit 5866c60

Please sign in to comment.
Something went wrong with that request. Please try again.