add: allow blank descriptions
This commit is contained in:
parent
6cd65ea7a6
commit
9acb57cfc5
@ -54,7 +54,7 @@ getTransaction j opts args defaultDate = do
|
|||||||
(Just $ showDate defaultDate)
|
(Just $ showDate defaultDate)
|
||||||
(Just $ \s -> null s ||
|
(Just $ \s -> null s ||
|
||||||
isRight (parse (smartdate >> many spacenonewline >> eof) "" $ lowercase 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
|
let historymatches = transactionsSimilarTo j args description
|
||||||
bestmatch | null historymatches = Nothing
|
bestmatch | null historymatches = Nothing
|
||||||
| otherwise = Just $ snd $ head historymatches
|
| otherwise = Just $ snd $ head historymatches
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
bin/hledger -f nosuch.journal add
|
|
||||||
<<<
|
|
||||||
|
|
||||||
|
|
||||||
>>>2 /date .*: description: description:/
|
|
||||||
Loading…
Reference in New Issue
Block a user