From 51d582e845eb3ee1bb9e78e1e95ce453e217a20b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 9 Mar 2021 07:37:52 -0800 Subject: [PATCH] also keep supporting --value=cost,COMM for now (#1499) --- hledger-lib/Hledger/Reports/ReportOptions.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Reports/ReportOptions.hs b/hledger-lib/Hledger/Reports/ReportOptions.hs index 7973aacd3..9cec778f6 100644 --- a/hledger-lib/Hledger/Reports/ReportOptions.hs +++ b/hledger-lib/Hledger/Reports/ReportOptions.hs @@ -450,13 +450,13 @@ valuationTypeFromRawOpts rawopts = (costing, valuation) valuationopts = collectopts valuationfromrawopt rawopts valuationfromrawopt (n,v) -- option name, value - | n == "B" = Just (Cost, Nothing) + | n == "B" = Just (Cost, Nothing) -- keep supporting --value=cost for now | n == "V" = Just (NoCost, Just $ AtEnd Nothing) | n == "X" = Just (NoCost, Just $ AtEnd (Just $ T.pack v)) | n == "value" = Just $ valueopt v | otherwise = Nothing valueopt v - | t `elem` ["cost","c"] = (Cost, usageError "--value=cost,COMM is no longer supported, please specify valuation explicitly, e.g. --cost --value=then,COMM" <$ mc) + | t `elem` ["cost","c"] = (Cost, Just $ AtThen mc) -- keep supporting --value=cost,COMM for now | t `elem` ["then" ,"t"] = (NoCost, Just $ AtThen mc) | t `elem` ["end" ,"e"] = (NoCost, Just $ AtEnd mc) | t `elem` ["now" ,"n"] = (NoCost, Just $ AtNow mc)