Interesting -- had I known about .ledgerrc, my bash aliases could have been much simplified. :-)
I started using --market to avoid seeing different commodity amounts, and getting output like this (without the rc file): --market --yearly --collapse reg <no output> --market --yearly --collapse reg ^e 17-Jan-01 - 17-Dec-31 <Total> $44.63 $44.63 18-Jan-01 - 18-Dec-31 <Total> $81.27 $125.90 --market --yearly --collapse reg ^a 17-Jan-01 - 17-Dec-31 <Total> $-11.76 $-11.76 And then with your rc --empty setting, I get: --market --yearly --collapse reg --empty 17-Jan-01 - 17-Dec-31 <Total> 0 0 18-Jan-01 - 18-Dec-31 <Total> 0 0 With similar test data I had a scenario where I'd only get data for the year that has investment stuff. I tried several variations with rc settings as in your file but --empty was the only thing that made a difference. And --empty might do the job for me since all I'm trying to do is determine what years have data for a given set of filters. Thanks again for your help! Scott On Monday, February 19, 2018 at 10:29:38 AM UTC-6, Jostein Berntsen wrote: > > On 19.02.18,06:47, Scott Carpenter wrote: > > Thank you, Jostein. I don't have a ~/.ledgerrc file but created an > empty > > one. Any suggested settings? > > > > Here is my ledgerrc settings: > > --file ~/ledger/jbfinans-2018.dat > --pager more > --no-color > --empty > --wide > --date-format=%Y-%m-%d > LEDGER_BASE_CURRENCY: NOK > LEDGER_PRICE_DATE_FORMAT: %Y-%m-%d > > > Jostein > > > > Experimenting a bit more, if I add other other commodities, e.g. this > entry: > > > > 2017/11/15 zombie investments > > a: 401k: big co 500 idx 1.745 abcdx @ > > $81.23 > > a: 401k: bonds idx 2.357 lmnop @ > > $20.05 > > a: 401k: cash $-189 > > > > Then I get output for --collapse, but only for that entry. > > > > 17-Nov-15 zombie investments <Total> $-189.00 > > 1.745 abcdx > > 2.357 lmnop > > $-189.00 > > > 1.745 > > abcdx > > > 2.357 > > lmnop > > > > I get other stuff if specifying `reg '^e'`: > > > > 17-Nov-01 food and stuff <Total> $32.87 > > > $32.87 > > 17-Dec-05 food and stuff e: food: groceries $11.76 > > > $44.63 > > 18-Jan-03 gas n go <Total> $23.87 > > > $68.50 > > 18-Jan-05 food and stuff e: food: groceries $57.40 > > > $125.90 > > > > Thanks again. For my purposes this isn't really getting in the way but > > would be good to understand why this happens. (Especially if ledger is > > reporting incorrectly.) > > > > > > > > On Monday, February 19, 2018 at 8:01:09 AM UTC-6, Jostein Berntsen > wrote: > > > > > > On 18.02.18,10:26, Scott Carpenter wrote: > > > > Trying to use --collapse and it comes up empty on this data set: > > > > > > > > 2017/11/01 food and stuff > > > > e: food: groceries > > > > e: home: stuff: in $10 > > > > l: credit card: mega $-32.87 > > > > > > > > 2017/12/05 food and stuff > > > > e: food: groceries > > > > a: checking out $-11.76 > > > > > > > > 2018/01/03 gas n go > > > > e: car: gas > > > > e: car: maintenance $6.5 > > > > l: credit card: mega $-23.87 > > > > > > > > 2018/01/05 food and stuff > > > > e: food: groceries > > > > l: credit card: mega $-57.4 > > > > > > > > > > > > Running: ledger -f <file> reg --collapse > > > > > > > > (Wanting to run it with --yearly, but empty either way when > --collapse > > > is > > > > added.) > > > > > > > > Works as expected with a larger "real" dataset. > > > > > > > > Any ideas or wisdom? Thank you! > > > > > > > > > > It seems to work correctly with the bal and --collapse command, but > not > > > with reg and --collapse. > > > > > > Another similar thread from previously: > > > > > > > https://groups.google.com/forum/#!msg/ledger-cli/zwGRSJO376s/XpBUQbbmBAAJ > > > > > > Can you check your ledgerrc settings, or copy one to ~ if you have no > rc > > > file? > > > > > > > > > > > > Jostein > > > > > > > > > > -- > > > > --- > > 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 ledger-cli+...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > > -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.