4 ms·
A key advantage of hledger, and why I migrated from ledger, is that hledger internally orders transactions chronologically, whereas ledger inexplicably orders t
by chromatin 3y ago
A key advantage of hledger, and why I migrated from ledger, is that hledger internally orders transactions chronologically, whereas ledger inexplicably orders them in the order they appear int he file, irrespective of the date attached to them.
This [ledger's approach] totally breaks the ability to break different transaction types into different files and then import all files into a master file.
- lvass 3y agoYou can get this behavior with --sort d in argument or ledgerrc or setting LEDGER_SORT=d in your environment. Or merge files sorted by date with ledger -f file1 -f file2 --sort d print. I agree the default sorting is quite jarring, but practically every single time if some entry is out of place chronologically, for me it's because I input-ed the wrong date and the default sort makes more sense. The reason I have hledger installed is for check ordereddates.
- speleding 3y agoMy solution is to pick the file names in such a way that `include *.ledger` imports them in the right order (you need the latest version of ledger for that to work, in older versions the order was indeterminate)