Syntax incompatibility with Ledger's auto posting multipliers

14 views
Skip to first unread message

Liam

unread,
Feb 26, 2021, 10:40:31 AMFeb 26
to hle...@googlegroups.com
Hi there,

I noticed while flipping between Ledger and hledger that their syntaxes[1,2] for multipliers in automated postings seem to be mutually incompatible.

hledger requires an asterisk while Ledger requires a bare number. Is this intentional? It's not mentioned in the FAQ.[3]

A trivial example:
---
= Income
(Tithe) 0.1 ; Ledger
(Tithe) *0.1 ; hledger

2021-02-26 Example transaction
Income £10
Assets
---

Cheers,
Liam.

[1]: https://www.ledger-cli.org/3.0/doc/ledger3.html#Amount-multipliers
[2]: https://hledger.org/hledger.html#auto-postings
[3]: https://hledger.org/faq.html#file-format-differences

Simon Michael

unread,
Feb 26, 2021, 11:30:41 AMFeb 26
to hledger
Hi, yes it's different. Ledger has a featureful embedded value expression language, while we have only a very minimal one. I have added a mention to the FAQ.
> --
> You received this message because you are subscribed to the Google Groups "hledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/b89227df-a87c-0820-fb00-1f2cbd9e36ac%40lmcm.io.

Liam

unread,
Jul 24, 2021, 12:30:05 PMJul 24
to hle...@googlegroups.com
On 26/02/2021 16:30, Simon Michael wrote:
> Hi, yes it's different. Ledger has a featureful embedded value
> expression language, while we have only a very minimal one. I have
> added a mention to the FAQ.


This incompatibility also makes the Journal Format[1] section of the docs incorrect too I guess?

> hledger's journal format is a compatible subset, mostly, of ledger's
> journal format, so hledger can work with compatible ledger journal
> files as well. It's safe, and encouraged, to run both hledger and
> ledger on the same journal file, eg to validate the results you're
> getting.

Ta,
Liam.

[1]: https://hledger.org/hledger.html#journal-format
Reply all
Reply to author
Forward
0 new messages