]> gitweb.michael.orlitzky.com - hath.git/commitdiff
Allow "regexed" and "reduced" for the mode.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 1 May 2010 07:53:19 +0000 (03:53 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 1 May 2010 07:53:19 +0000 (03:53 -0400)
Add valid modes to the usage string.

src/CommandLine.hs

index 51f20289fe9adb1c3c28163f92b308389a0eba3d..f15a786c9089de96d7655bac2270dc1270aae26c 100644 (file)
@@ -71,7 +71,7 @@ set_input arg opts = do
 
 -- The usage header
 usage :: String
-usage = "Usage: hath [-h] [-i FILE]"
+usage = "Usage: hath [regexed|reduced] [-h] [-i FILE]"
 
 
 -- The usage header, and all available flags (as generated by GetOpt)
@@ -106,9 +106,11 @@ parse_mode = do
     else do
       -- Some non-option was given, but were any of them modes?
       case (lowercase (non_options !! 0)) of
-        "regex"  -> return Regex
-        "reduce" -> return Reduce
-        _        -> return Regex
+        "regex"   -> return Regex
+        "regexed" -> return Regex
+        "reduce"  -> return Reduce
+        "reduced" -> return Reduce
+        _         -> return Regex