Printing to stdout

2023-06-09 Thread Bob Wilson
Hi folks,
   I recently upgraded to Ledger 3.3.2-20230330, from 3.2.1-20200518.

Previously, running a command like `ledger -f ledger.dat balance ^Assets` 
would print results directly to the screen and return me to the prompt, but 
now that same command prints results to some kind of temporary screen that 
disappears when I hit `q`. It's like the difference between `cat` and 
`less`. Sorry I don't know the right terminology!

As a workaround, I can pipe the command into cat, and then it prints to the 
screen. Is there a way to just print to the screen by default?

Thanks!
Bob Wilson

-- 

--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/e6651f42-ea5f-4174-889c-e3724163f82bn%40googlegroups.com.


Re: Reducing repetition/duplication of amount value in entries

2023-06-09 Thread John Wiegley
> "VA" == Viraj Alankar  writes:

VA> I found one way that I think should work:
VA> = "Liabilities:Apple Card" and %cashback
VA> Assets:Apple Cash   (-tag("cashback"))
VA> Income:Credit Card Rewards   (tag("cashback"))

VA> 2023/06/06 McDonalds
VA> ; cashback:: 0.02
VA> Expenses:Food:Restaurants   $23.98
VA> Liabilities:Apple Card
VA> 2023/06/07 Transfer
VA> Liabilities:Apple Card  $23.98
VA> Assets:Some bank

VA> Mainly found by searching bugs. The manual would really benefit with some
VA> more realistic examples in the Automated Transactions section.

Interesting example! Please feel free to submit it as an addition to the docs,
if you’d be willing.

John

-- 

--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/m2o7lompl5.fsf%40newartisans.com.


Re: Reducing repetition/duplication of amount value in entries

2023-06-09 Thread Viraj Alankar
I found one way that I think should work:

= "Liabilities:Apple Card" and %cashback
Assets:Apple Cash   (-tag("cashback"))
Income:Credit Card Rewards   (tag("cashback"))

2023/06/06 McDonalds
; cashback:: 0.02
Expenses:Food:Restaurants   $23.98
Liabilities:Apple Card
2023/06/07 Transfer
Liabilities:Apple Card  $23.98
Assets:Some bank

Mainly found by searching bugs
.
The manual would really benefit with some more realistic examples in
the Automated
Transactions
 section.

Thanks,

Viraj.


On Thu, Jun 8, 2023 at 4:55 PM Yuri Khan  wrote:

> On Thu, 8 Jun 2023 at 21:28, Viraj Alankar  wrote:
>
> > What would be right way to do apply the automatic transaction only when
> there is also an Expenses entry? I could not figure out the proper syntax.
> I tried something like:
> >
> > = expr "any(account =~ /^Liabilities:Apple Card/) and any(account =~
> /^Expenses/)"
> >
> > but this does not seem to work. I get some errors if I try removing the
> quotes, but I'm likely doing it wrong.
>
> You might instead apply cashback only where the amount is negative.
> But I’m struggling with complex condition syntax too, so maybe someone
> else will chime in.
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Ledger" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ledger-cli/tqXZGjJbZSo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ledger-cli+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/CAP_d_8VuMoRwog1834ZnuXzQayrf074sx7_hApctjxEc%2BgcrEw%40mail.gmail.com
> .
>

-- 

--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/CAM502dPsEMoLEv5uDvJHLpGCjXtVY5_15hWxB7EgX1uS-_Q5VA%40mail.gmail.com.