Auto-posting reference-account

In Ledger CLI's auto-postings, I can use $account — 5.22.3 in the manual — to refer to the account matched. So a ledger like so

= ^Revenue
    Liabilities:Tax  0.05
    $account        -0.05

2024-07-22 * Business
    Revenue    -500 CUR
    Assets:Bank

Would yield the following output effectively

$ ledger print --generated -f file.ledger
2024/07/22 * Business
    Revenue                                 -500 CUR
    Assets:Bank                              500 CUR
    Liabilities:Tax                          -25 CUR
    Revenue                                   25 CUR

How can I achieve the same thing in HLedger?

The idea here is I want to identify revenues using multiple sub-accounts which would be subject to the same tac rule. For example Revenue:Sales:Customer 1 and Revenue:Sales:Customer 2 should be subject to the same sales tax

Currently the only way within hledger is to have multiple auto posting rules, one for each account.

[💰$100 bounty] Auto postings: Allow referring to the matched account · Issue #1975 · simonmichael/hledger · GitHub is the wishlist issue.