I've been meaning to separate my journal file into separate files for each year, but if I start with a blank journal file in January, hledger add
will no longer match transaction descriptions to similar transactions from last year. Is there any way to keep the smart hledger add
transaction matching from previous year's transaction history when you are starting a new year with a new journal file?
You can include the old year from the new year file for a while, that should make the history available to tools like hledger add & hledger-iadd.
Are you referring to a directive at the beginning of the file? For example:
include 2024.journal
2025-01-01 * opening balances ...
Or did you mean to keep all of the transactions in one file for the time being?
Thank you!
Yes I meant add an include
directive like that, it's enough. (An older tactic was to just delay new file creation until a few months into the year, but that's messy.)