better commandline parsing

This commit is contained in:
Mirek Kratochvil 2020-12-29 19:45:36 +01:00
parent e19a00b6d8
commit 14d7b454ff

View file

@ -123,7 +123,7 @@ main =
"Compare, patch and merge files on arbitrarily-tokenized sequences." <> "Compare, patch and merge files on arbitrarily-tokenized sequences." <>
header "adiff: arbitrary-token diff utilities") header "adiff: arbitrary-token diff utilities")
in do ADiffOptions {adiffRedfaOpt = ropt, adiffCmdOpts = copt} <- in do ADiffOptions {adiffRedfaOpt = ropt, adiffCmdOpts = copt} <-
execParser opts customExecParser (prefs $ helpShowGlobals <> subparserInline) opts
redfa <- redfaPrepareRules ropt redfa <- redfaPrepareRules ropt
case copt of case copt of
CmdDiff {diffFile1 = f1, diffFile2 = f2, context = ctxt} -> do CmdDiff {diffFile1 = f1, diffFile2 = f2, context = ctxt} -> do