From 57845872087a64dc29d9a1fc0c9b517351aa58fc Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 2 Jun 2011 22:56:17 +0000 Subject: [PATCH] convert: warn if there is neither amount-field or in & out-field --- hledger/Hledger/Cli/Convert.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/Convert.hs b/hledger/Hledger/Cli/Convert.hs index 840dfa1b7..cde13f204 100644 --- a/hledger/Hledger/Cli/Convert.hs +++ b/hledger/Hledger/Cli/Convert.hs @@ -171,8 +171,9 @@ validateRules rules = let in case (hasAccount, hasIn, hasOut) of (True, True, _) -> Just "Don't specify in-field when specifying amount-field" (True, _, True) -> Just "Don't specify out-field when specifying amount-field" - (_, False, True) -> Just "You have to specify in-field when specifying out-field" - (_, True, False) -> Just "You have to specify out-field when specifying in-field" + (_, False, True) -> Just "Please specify in-field when specifying out-field" + (_, True, False) -> Just "Please specify out-field when specifying in-field" + (False, False, False) -> Just "Please specify either amount-field, or in-field and out-field" _ -> Nothing -- rules file parser