Feature request: no continuation gap at all
Multi-line queries have a prompt_continuation (or not currently, due to issue 681, but that's beside the point). But even with prompt_continuation set to an empty string, it starts the next line indented, even when it's just due to wrapping at the edge of the terminal window:
db> select "example text that wraps onto the nex t line";
I often copy/paste my query from my terminal, for example to share with others or just document what I did in case I need to reproduce it later. But the formatting above leaves a big space in the query, so that when I paste it elsewhere it looks like select "example text that wraps onto the nex t line";.
It would be nice if the configuration related to multi-line and prompt continuation had some way to get this format:
db> select "example text that wraps onto the nex t line";
This is obviously pretty minor. Just thought I'd put this out there since it does come up for me, and maybe someone else will agree.
I agree this would be useful!
As a workaround (what I usually do) you can add \e to the query and press enter or press ctrl-x ctrl-e which opens an editor from where you can save the query.
I hate to bump issues, but I went to the docs looking for a way to turn off query wrapping - apparently called continuation. Same reasons for me, I copy my terminal output after writing the one-off query and paste it in some issue for tracking/history. Annoying to have to remove the \n<spaces>-> every time.
Isn't it sufficient now to set prompt_continuation = '' in ~/.myclirc ?
@rolandwalker as OP said, no because it still includes the newline and spaces on subsequent lines.
Edit: Hmm, having tried it now, seems to work okay. So this can probably be closed.
The newlines may still be there, in which case you might want to try following the query with \clip to copy it directly to the clipboard.