From 49a0976cbc0f512442682e3095e1bcb657919da0 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 1 May 2010 03:53:19 -0400 Subject: [PATCH] Allow "regexed" and "reduced" for the mode. Add valid modes to the usage string. --- src/CommandLine.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.43.2