dev: journal: ignore CLI flags in journal
This commit is contained in:
parent
aa5323e6ed
commit
2357a7a750
@ -244,6 +244,7 @@ directivep = (do
|
|||||||
,bucketdirectivep
|
,bucketdirectivep
|
||||||
,capturedirectivep
|
,capturedirectivep
|
||||||
,checkdirectivep
|
,checkdirectivep
|
||||||
|
,commandlineflagdirectivep
|
||||||
,commoditydirectivep
|
,commoditydirectivep
|
||||||
,commodityconversiondirectivep
|
,commodityconversiondirectivep
|
||||||
,definedirectivep
|
,definedirectivep
|
||||||
@ -525,7 +526,7 @@ formatdirectivep expectedsym = do
|
|||||||
-- More Ledger directives, ignore for now:
|
-- More Ledger directives, ignore for now:
|
||||||
-- apply fixed, apply tag, assert, bucket, A, capture, check, define, expr
|
-- apply fixed, apply tag, assert, bucket, A, capture, check, define, expr
|
||||||
applyfixeddirectivep, applytagdirectivep, assertdirectivep, bucketdirectivep, capturedirectivep,
|
applyfixeddirectivep, applytagdirectivep, assertdirectivep, bucketdirectivep, capturedirectivep,
|
||||||
checkdirectivep, definedirectivep, exprdirectivep :: JournalParser m ()
|
checkdirectivep, definedirectivep, exprdirectivep, commandlineflagdirectivep :: JournalParser m ()
|
||||||
applyfixeddirectivep = do string "apply fixed" >> lift restofline >> return ()
|
applyfixeddirectivep = do string "apply fixed" >> lift restofline >> return ()
|
||||||
applytagdirectivep = do string "apply tag" >> lift restofline >> return ()
|
applytagdirectivep = do string "apply tag" >> lift restofline >> return ()
|
||||||
assertdirectivep = do string "assert" >> lift restofline >> return ()
|
assertdirectivep = do string "assert" >> lift restofline >> return ()
|
||||||
@ -534,6 +535,7 @@ capturedirectivep = do string "capture" >> lift restofline >> return ()
|
|||||||
checkdirectivep = do string "check" >> lift restofline >> return ()
|
checkdirectivep = do string "check" >> lift restofline >> return ()
|
||||||
definedirectivep = do string "define" >> lift restofline >> return ()
|
definedirectivep = do string "define" >> lift restofline >> return ()
|
||||||
exprdirectivep = do string "expr" >> lift restofline >> return ()
|
exprdirectivep = do string "expr" >> lift restofline >> return ()
|
||||||
|
commandlineflagdirectivep = do string "--" >> lift restofline >> return ()
|
||||||
|
|
||||||
keywordp :: String -> JournalParser m ()
|
keywordp :: String -> JournalParser m ()
|
||||||
keywordp = void . string . fromString
|
keywordp = void . string . fromString
|
||||||
|
|||||||
@ -2749,6 +2749,7 @@ capture ACCT REGEX
|
|||||||
check EXPR
|
check EXPR
|
||||||
define VAR=EXPR
|
define VAR=EXPR
|
||||||
expr EXPR
|
expr EXPR
|
||||||
|
--command-line-flag
|
||||||
```
|
```
|
||||||
|
|
||||||
# CSV
|
# CSV
|
||||||
|
|||||||
@ -49,10 +49,3 @@ $ hledger -f- check
|
|||||||
$ hledger -f- check
|
$ hledger -f- check
|
||||||
>2//
|
>2//
|
||||||
>=1
|
>=1
|
||||||
|
|
||||||
# command line options
|
|
||||||
<
|
|
||||||
--strict
|
|
||||||
$ hledger -f- check
|
|
||||||
>2//
|
|
||||||
>=1
|
|
||||||
|
|||||||
@ -55,4 +55,6 @@ check 1
|
|||||||
define var_name=$100
|
define var_name=$100
|
||||||
expr 1
|
expr 1
|
||||||
N USD
|
N USD
|
||||||
|
--command-line-flag
|
||||||
|
|
||||||
$ hledger -f- check
|
$ hledger -f- check
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user