mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 02:37:12 +03:00
82 lines
1.7 KiB
Plaintext
82 lines
1.7 KiB
Plaintext
# 1. register --depth N matches postings as usual but clips account names to N
|
|
hledger -f - register aa --depth 1
|
|
<<<
|
|
2010/1/1 x
|
|
a:aa:aaa 1
|
|
b
|
|
>>>
|
|
2010/01/01 x a 1 1
|
|
>>>=0
|
|
|
|
# 2. separate postings remain separate
|
|
hledger -f - register aa --depth 2
|
|
<<<
|
|
2010/1/1 x
|
|
a:aa 1
|
|
b:bb:bbb
|
|
|
|
2010/1/1 y
|
|
a:aa 1
|
|
b:bb:bbb
|
|
|
|
2010/1/2 z
|
|
a:aa 1
|
|
b:bb:bbb
|
|
>>>
|
|
2010/01/01 x a:aa 1 1
|
|
2010/01/01 y a:aa 1 2
|
|
2010/01/02 z a:aa 1 3
|
|
>>>=0
|
|
|
|
# 3. with a reporting interval, all postings are aggregated under each (clipped) account
|
|
hledger -f - register aa --depth 1 --daily
|
|
<<<
|
|
2010/1/1 x
|
|
a:aa 1
|
|
b:bb:bbb
|
|
|
|
2010/1/1 y
|
|
a:aa 1
|
|
b:bb:bbb
|
|
|
|
2010/1/2 z
|
|
a:aa 1
|
|
b:bb:bbb
|
|
>>>
|
|
2010/01/01 a 2 2
|
|
2010/01/02 a 1 3
|
|
>>>=0
|
|
|
|
# 4. with --cleared
|
|
hledger -f - register a --depth 1 --cleared
|
|
<<<
|
|
2012/1/1 *
|
|
(a:aa) 1
|
|
>>>
|
|
2012/01/01 (a) 1 1
|
|
>>>2
|
|
>>>=0
|
|
|
|
# 5. depth 0 aggregates everything into a single line
|
|
hledger -f - register --depth 0 --daily a b
|
|
<<<
|
|
2010/1/1 x
|
|
a:aa 1
|
|
b:bb 2
|
|
c:cc
|
|
|
|
2010/1/1 y
|
|
a:aa 1
|
|
b:bb 2
|
|
c:cc
|
|
|
|
2010/1/2 z
|
|
a:aa 1
|
|
b:bb 2
|
|
c:cc
|
|
>>>
|
|
2010/01/01 ... 6 6
|
|
2010/01/02 ... 3 9
|
|
>>>=0
|
|
|