Permalink
Browse files

Merge pull request #8 from trentm/dashq

add '-?' opt for usage as well
  • Loading branch information...
2 parents c83e3a2 + 4eeb3db commit 20d30ccac725ffe220aa954e722e340075dbeb36 @davepacheco committed Feb 9, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 jsstyle
View
@@ -55,7 +55,7 @@ use Getopt::Std;
use strict;
my $usage =
-"Usage: jsstyle [-hvcC] [-t <num>] [-f <path>] [-o <config>] file ...
+"Usage: jsstyle [-h?vcC] [-t <num>] [-f <path>] [-o <config>] file ...
Check your JavaScript file for style.
See <https://github.com/davepacheco/jsstyle> for details on config options.
@@ -78,12 +78,12 @@ Options:
my %opts;
-if (!getopts("cho:t:f:vC", \%opts)) {
+if (!getopts("ch?o:t:f:vC", \%opts)) {
print $usage;
exit 2;
}
-if (defined($opts{'h'})) {
+if (defined($opts{'h'}) || defined($opts{'?'})) {
print $usage;
exit;
}

0 comments on commit 20d30cc

Please sign in to comment.