From: Michael Orlitzky Date: Sat, 1 May 2010 07:53:19 +0000 (-0400) Subject: Allow "regexed" and "reduced" for the mode. X-Git-Tag: 0.0.1~87 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=49a0976cbc0f512442682e3095e1bcb657919da0;p=hath.git Allow "regexed" and "reduced" for the mode. Add valid modes to the usage string. --- diff --git a/src/CommandLine.hs b/src/CommandLine.hs index 51f2028..f15a786 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -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