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