add: allow blank descriptions

This commit is contained in:
Simon Michael 2010-07-17 15:13:16 +00:00
parent 6cd65ea7a6
commit 9acb57cfc5
2 changed files with 1 additions and 6 deletions

View File

@ -54,7 +54,7 @@ getTransaction j opts args defaultDate = do
(Just $ showDate defaultDate)
(Just $ \s -> null s ||
isRight (parse (smartdate >> many spacenonewline >> eof) "" $ lowercase s))
description <- askFor "description" Nothing (Just $ not . null)
description <- askFor "description" (Just "") Nothing
let historymatches = transactionsSimilarTo j args description
bestmatch | null historymatches = Nothing
| otherwise = Just $ snd $ head historymatches

View File

@ -1,5 +0,0 @@
bin/hledger -f nosuch.journal add
<<<
>>>2 /date .*: description: description:/