directives from included files have are ignored
redneb opened this issue · 4 comments
This is a relatively minor issue, but hledger
seems to ignore some (all?) directives that are include
d from some other file.
Here's a minimal example. Create the following 2 files:
; file1.journal
D 1,000.00 USD
and
; file2.journal
include file1.journal
2024-03-31 Test
expense:test 1234.5
asset:bank
If you do an hledger print
on this file you'll get the following output:
$ hledger -f file2.journal print
2024-03-31 Test
expense:test 1234.5
asset:bank
I would have expected the output to look like this:
2024-03-31 Test
expense:test 1,234.50 USD
asset:bank
I am trying this with:
$ hledger --version
hledger 1.32.3, linux-x86_64
To be precise: at https://hledger.org/1.32/hledger.html#directive-effects, D's "Sets a default commodity" effect has "Y" for "ends at file end?". But at https://hledger.org/1.32/hledger.html#d-directive, "This effect lasts until ... end of the journal" seems ambiguous, I'll change it to "end of the file".
Ah, it seems my meticulous document-reading skills took a day off just when I needed them the most! Apologies for the spam!
To be precise: at https://hledger.org/1.32/hledger.html#directive-effects, D's "Sets a default commodity" effect has "Y" for "ends at file end?". But at https://hledger.org/1.32/hledger.html#d-directive, "This effect lasts until ... end of the journal" seems ambiguous, I'll change it to "end of the file".
I concur with the suggested change, thanks!
No problem.. there are are a lot of docs. Thanks for the report.