Using the --strict option

302 views
Skip to first unread message

Oliver Hardy

unread,
Jan 1, 2021, 5:21:22 PM1/1/21
to Ledger
I have a file ~/.ledgerrc:
--file /home/ohardy/.ledger.dat
--file /home/ohardy/Accounts

The ~/Accounts file consists of entries:
account Assets:Checking
account Liabilities:Credit_Card
account Expenses:Utilities:NatGrid
account Expenses:Rent
etc

I have an alias set up in ~/.aliases:
alias ledger='ledger -i ~/.ledgerrc

Anytime I use the --strict option either as 'ledger bal --strict' or from the 'check buffer' option in the toolbar I'm told that every account is unknown and that '$' is an unknown commodity.

What am I doing wrong?

Thank you for any assistance.

Martin Michlmayr

unread,
Jan 1, 2021, 8:04:59 PM1/1/21
to ledge...@googlegroups.com
* Oliver Hardy <ohar...@gmail.com> [2021-01-01 14:21]:
> I have a file ~/.ledgerrc:
> --file /home/ohardy/.ledger.dat
> --file /home/ohardy/Accounts

Files are included in the order given, so you have to specify the
file with the account definitions first.

> I have an alias set up in ~/.aliases:
> alias ledger='ledger -i ~/.ledgerrc

This is redundant since ledger looks for ~/.ledgerrc automatically.

> and that '$' is an unknown commodity.

You have to declare it with:

commodity $

--
Martin Michlmayr
https://www.cyrius.com/

Oliver Hardy

unread,
Jan 1, 2021, 9:11:53 PM1/1/21
to ledge...@googlegroups.com
Thank you for your help. Everything now seems to work correctly.

> On Jan 1, 2021, at 8:05 PM, Martin Michlmayr <t...@cyrius.com> wrote:
>
> * Oliver Hardy <ohar...@gmail.com> [2021-01-01 14:21]:
> --
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "Ledger" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/ledger-cli/L0fDtEn-gEY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to ledger-cli+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/20210102010450.GA29099%40jirafa.cyrius.com.
Reply all
Reply to author
Forward
0 new messages