#857960 ledger: --empty option does not work

Package:
ledger
Source:
ledger
Description:
command-line double-entry accounting program
Submitter:
Owen Heisler
Date:
2026-07-01 23:47:05 UTC
Severity:
normal
#857960#5
Date:
2017-03-16 17:16:27 UTC
From:
To:
This bug has also been reported upstream at:
http://bugs.ledger-cli.org/show_bug.cgi?id=1204

The `--empty` option has no effect on the output of the `balance`
command. I expect the `--empty` option to cause the `balance` report
to display all accounts that have been declared with the `account`
command, even if they are zero balance or are parent accounts.

Here is an example journal.

~~~
account Assets
account Expenses
account Expenses:Clothing
account Expenses:Food
account Income

2017-03-15 Employer
    Income             $-100
    Assets              $100

2017-03-15 Restaurant
    Assets              $-20
    Expenses:Food        $20
~~~

Ledger shows the same balance report with or without `--empty`:

~~~
$ ledger --no-total --empty balance
                 $80  Assets
                 $20  Expenses:Food
               $-100  Income
~~~

I tested this with the version in Debian Jessie and the latest in the
next branch on GitHub.

~~~
$ ledger --version | head -n1
Ledger 3.1.0-20141005, the command-line accounting tool
$ ledger --version | head -n1
Ledger 3.1.1-20160111, the command-line accounting tool
~~~

This is the expected output:

~~~
$ ledger --no-total --empty balance # EXAMPLE
                 $80  Assets
                 $20  Expenses
                   0    Clothing
                 $20    Food
               $-100  Income
~~~

Thank you!

#857960#12
Date:
2019-01-26 17:06:42 UTC
From:
To:
* Owen Heisler <owenh000@gmail.com> [2017-03-16 12:16]:

What you say actually makes a lot of sense but that's not how it works
today.

#857960#17
Date:
2026-07-02 01:52:40 UTC
From:
To:
not find a corresponding issue in the current upstream tracker. Keeping the bug
open.