How to get all the amount in the register to be in a straight line?

50 views
Skip to first unread message

Oscar

unread,
Dec 5, 2019, 1:30:24 PM12/5/19
to Ledger
hi,
whenever i run register the amounts/balance in the amount are not justified in one straight line but rather go left and right depending on the payee description. I have tried to adjust the payee width parameters but still cant get it in a straight line.
I would deeply appreciate if someone can help with this. Is there any way to force the amount/balance to be in a straight line?
 thanks

o1bigtenor

unread,
Dec 5, 2019, 2:31:12 PM12/5/19
to ledge...@googlegroups.com
Greetings

If I'm understanding your question correctly my work flow goes like:

date payee
; info needed or wishing
Expense: item_description: item_account_code_number
$ 231.09
Expense: item_description: item_account_code_number
$ 18.89
Asset: info_re:_acct_location: item_account_code_number
$ -249.98

So I have a bunch of tabs (@ 8 spaces) before I get to the amounts.
I have things so the final numbers always line up. The currency symbol is in a
different column for the expenses and assets.

HTH

Regards

Oscar

unread,
Dec 5, 2019, 2:43:10 PM12/5/19
to Ledger
hey!
interesting solution. i'll try that and see how it works. thank you :-)
i am also wondering if with --format this could be achieved but for now this is a novel solution. will wait for others to chime in.
many thanks

o1bigtenor

unread,
Dec 5, 2019, 3:47:23 PM12/5/19
to ledge...@googlegroups.com
On Thu, Dec 5, 2019 at 1:43 PM Oscar <orzya...@gmail.com> wrote:
>
> hey!
> interesting solution. i'll try that and see how it works. thank you :-)
> i am also wondering if with --format this could be achieved but for now this is a novel solution. will wait for others to chime in.
> many thanks
>

Formatting didn't seem to work but its just a bunch of tabs (white space)
written information and the currency amounts.
Sorry not sure how to get the visual look of what I have - - - I think I'm
using something like 125 column spaces (haven't counted just know its
a lot more than 80!!).

Regards

Jostein Berntsen

unread,
Dec 10, 2019, 7:10:10 PM12/10/19
to ledge...@googlegroups.com
You can use the --register-format option to set this if you use a narrow
width terminal. Enter one of those options in your ~/.ledgerrc file:

Output entries on separate lines:

--register-format %(date) %(payee)\n \t%-.38(account) %22.108(amount)
%22.132(total)\n

All on one line, truncated Payee width:

--register-format %(date) %-.35(payee) \t%-.38(account)
%10.100(amount) %15.100(total)\n


Jostein





Reply all
Reply to author
Forward
0 new messages