hledger/tests/balance/multicommodity.test
Stephen Morgan 57d7b223a2 lib: Write new showMixedAmount* functions which keep track of length.
Previously showMixedAmountElided would show two amounts and then the
elision string if necessary. Now it will display as many Amounts as it
can subject to the condition that the amounts plus the elision string
fit within 22 characters.
2020-11-04 14:25:20 +11:00

27 lines
611 B
Plaintext

# 1. In tabular balance reports, cap the maximum width and elide if sufficiently large
<
2020-01-01
(a) 1.00A
(a) 1.00B
(a) 1.00C
(a) 1.00D
$ hledger -f- bal -Y
Balance changes in 2020:
|| 2020
===++========================
a || 1.00A, 1.00B, 2 more..
---++------------------------
|| 1.00A, 1.00B, 2 more..
# 2. Unless --no-elide is used.
$ hledger -f- bal -Y --no-elide
Balance changes in 2020:
|| 2020
===++============================
a || 1.00A, 1.00B, 1.00C, 1.00D
---++----------------------------
|| 1.00A, 1.00B, 1.00C, 1.00D