# * register command depth limiting

# ** 1. register --depth N matches postings as usual but clips account names to N
<
2010/1/1 x
  a:aa:aaa      1
  b
$ hledger -f - register aa --depth 1
2010-01-01 x                    a                                1             1

# ** 2. separate postings remain separate
<
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
$ hledger -f - register aa --depth 2
2010-01-01 x                    a:aa                             1             1
2010-01-01 y                    a:aa                             1             2
2010-01-02 z                    a:aa                             1             3

# ** 3. with a reporting interval, all postings are aggregated under each (clipped) account
<
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
$ hledger -f - register aa --depth 1 --daily
2010-01-01   a                                                   2             2
2010-01-02   a                                                   1             3

# ** 4. with --cleared
<
2012/1/1 *
  (a:aa)      1
$ hledger -f - register a --depth 1 --cleared
2012-01-01                      (a)                              1             1

# ** 5. depth 0 aggregates everything into a single line
<
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
$ hledger -f - register --depth 0 --daily a b
2010-01-01   ...                                                 6             6
2010-01-02   ...                                                 3             9

