Why ledger bal --depth 4 --depth 1
Makes 1 overwrite 4, but: ledger bal --depth 4 --depth 6 6 doesn't overwrite 4? Is it a reason for that or it is a bug? It's a weird behavior for me. On Sunday, September 12, 2021 at 4:07:41 AM UTC-3 Rahix wrote: > Hi, > > On Sat, 2021-09-11 at 18:12 -0700, Felipe Mica wrote: > > I put this in my .ledgerc file: > > --depth 4 > > > > Now, if I do: > > > > ledger --depth 1 balance > > > > the ledger overwrites the option in the init file and shows only 1 > depth. That's the expected behavior. However, if put some depth bigger than > the defined 4 in the file, I would get only 4 levels. > > The option defined in the init file is used as "maximum" depth value, > which makes no sense to me. > > > > Am I missing something? > > I think what's happening here is that both --depth options get applied, > one after the other. The following command behaves exactly the same: > > ledger bal --depth 4 --depth 1 > > The reason for this is closely tied to the way these "filters" are > applied in ledger, so I think it isn't that easy to change this without > introducing inconsistencies... > > However maybe open a bug on GH to discuss whether this should be changed > in the future? I do see the appeal of having later --depth options > overwrite any earlier ones, it does feel more sensible to me as well... > > -- > Rahix > > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/e633c383-7194-46f1-8d4d-c328c23c25ccn%40googlegroups.com.
