Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #8 from trentm/dashq

add '-?' opt for usage as well
  • Loading branch information...
commit 20d30ccac725ffe220aa954e722e340075dbeb36 2 parents c83e3a2 + 4eeb3db
David Pacheco authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 jsstyle
6 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.