From c959e555addc854a83f18afbdc198bee186c0887 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 3 Feb 2019 13:04:59 -0800 Subject: [PATCH] print, reg: restore -o, -O flags dropped during refactor (#967) --- hledger/Hledger/Cli/Commands/Print.hs | 4 ++-- hledger/Hledger/Cli/Commands/Register.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Print.hs b/hledger/Hledger/Cli/Commands/Print.hs index a3fa320a8..c6406328a 100644 --- a/hledger/Hledger/Cli/Commands/Print.hs +++ b/hledger/Hledger/Cli/Commands/Print.hs @@ -28,14 +28,14 @@ import Hledger.Cli.Commands.Add ( transactionsSimilarTo ) printmode = hledgerCommandMode ($(embedFileRelative "Hledger/Cli/Commands/Print.txt")) - [let arg = "STR" in + ([let arg = "STR" in flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) arg ("show the transaction whose description is most similar to "++arg++", and is most recent") ,flagNone ["explicit","x"] (setboolopt "explicit") "show all amounts explicitly" ,flagNone ["new"] (setboolopt "new") "show only newer-dated transactions added in each file since last run" - ] + ] ++ outputflags) [generalflagsgroup1] [] ([], Just $ argsFlag "[QUERY]") diff --git a/hledger/Hledger/Cli/Commands/Register.hs b/hledger/Hledger/Cli/Commands/Register.hs index 19284bf2d..6e1c4596c 100644 --- a/hledger/Hledger/Cli/Commands/Register.hs +++ b/hledger/Hledger/Cli/Commands/Register.hs @@ -29,7 +29,7 @@ import Hledger.Cli.Utils registermode = hledgerCommandMode ($(embedFileRelative "Hledger/Cli/Commands/Register.txt")) - [flagNone ["cumulative"] (\opts -> setboolopt "change" opts) + ([flagNone ["cumulative"] (\opts -> setboolopt "change" opts) "show running total from report start date (default)" ,flagNone ["historical","H"] (\opts -> setboolopt "historical" opts) "show historical running total/balance (includes postings before report start date)\n " @@ -45,7 +45,7 @@ registermode = hledgerCommandMode #endif ++ " or $COLUMNS). -wN,M sets description width as well." ) - ] + ] ++ outputflags) [generalflagsgroup1] [] ([], Just $ argsFlag "[QUERY]")