I was not able to figure out how to do multi-line queries in interactive bean-query so I paste them into my beancount file and use fava to run them or run them with:
> bean-query <beancount file> run <query-name> I did jot this down in my notes, but not sure if my notes are accurate: - bean-query interactive uses the python gnu readline package (not to be confused with python library's readline) - https://stackoverflow.com/questions/161495/is-there-a-nice-way-of-handling-multi-line-input-with-gnu-readline - https://pymotw.com/2/readline/ On Wed, Feb 14, 2024 at 6:32 PM Martin Blais <[email protected]> wrote: > I don't know. If it's supported in > https://docs.python.org/3/library/cmd.html it should be possible to > improve it. > > > On Tue, Feb 13, 2024 at 5:55 AM Dan Andersson <[email protected]> > wrote: > >> Motivation: Give people (including Windows users) copy-pasteable commands >> they can simply use as-is (regardless of platform). >> >> On Tuesday, February 13, 2024 at 10:51:12 AM UTC Dan Andersson wrote: >> >>> Hi, I'm aware that backslashes can be used for Bash. >>> I was referring to the *interactive* session (after doing only >>> "bean-query foo.beancount"). I guess I was hoping it wouldn't "complete" a >>> command until it sees a semicolon, but currently it seems to complete a >>> command after every newline. >>> >>> On Saturday, February 10, 2024 at 3:01:39 PM UTC [email protected] wrote: >>> >>>> This is a bash question. Look at how multiple lines are handled in bash >>>> (should be lots of info online). >>>> >>>> On Sat, Feb 10, 2024 at 9:24 AM Dan Andersson <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> After doing bean-query foo.beancount to enter the interactive session, >>>>> can I somehow copy-paste multiple lines in there? >>>>> >>>>> It seems like multi-line queries (e.g. the examples in the >>>>> documentation), when pasted in there, always get split into one command >>>>> per >>>>> line, resulting in errors. >>>>> >>>>> Do I always have to combine those lines first, before pasting them? >>>>> >>>>> Thanks, >>>>> DA >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Beancount" 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/beancount/50b1d037-b464-4838-ae46-58ffc250e8b8n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/beancount/50b1d037-b464-4838-ae46-58ffc250e8b8n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "Beancount" 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/beancount/782b5ed0-a61e-487f-9f60-5d5757aaccd1n%40googlegroups.com >> <https://groups.google.com/d/msgid/beancount/782b5ed0-a61e-487f-9f60-5d5757aaccd1n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Beancount" 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/beancount/CAK21%2BhMORvD7wboc2asGKH_-g2pGoO9-miE3ciR-K-NQXLfGQg%40mail.gmail.com > <https://groups.google.com/d/msgid/beancount/CAK21%2BhMORvD7wboc2asGKH_-g2pGoO9-miE3ciR-K-NQXLfGQg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- -- Robert [email protected] 503 784-4428 -- You received this message because you are subscribed to the Google Groups "Beancount" 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/beancount/CANo1DYb8aLLoB50TqgOmbsyDqr6O2O-j2WkdhZMFBvEKhhZCjQ%40mail.gmail.com.
