While there are lines to be edited:
Press up arrow until line is recalled
Edit the line
Press the ENTER key to enter that line
Maybe you have to compile your own to include readline (on Linux), but it works for me. Both Linux and Windows.
The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume.
>From: sqlite-users <[hidden email]> On
>Behalf Of Csanyi Pal
>Sent: Saturday, 18 January, 2020 14:31
>To: [hidden email] >Subject: [sqlite] To edit in sqlite3 CLI multiline SQL statements?
>can one edit a multiline SQL statement in the sqlite3 CLI?
>Say I entered the following multiline SQL statement:
>sqlite> SELECT 1 UNION ALL
> ...> SELECT 2 UNION ALL
> ...> SELECT 3
> ...> ;
>Then after a while I want to run it again, then how can I use the bash
>history to get back my multiline SQL statement, to eventually modify it
>and re-run it again?
>Is there a way to do this in sqlite3 CLI?
>Best, Paul Chany
>sqlite-users mailing list
>[hidden email] >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Simon Slavin, on Saturday, January 18, 2020 04:58 PM, wrote...
> On 18 Jan 2020, at 9:30pm, Csanyi Pal, on
> > can one edit a multiline SQL statement in the sqlite3 CLI?
> But if you make a multiline SQL statement in a text file you can paste it into the CLI all in one operation.
Well, you could, but you need to hit the up arrow for every new line in that multiline, and edit the line. But, I agree with Simon: the best way to do it, is to use some text editor, and make the changes in the text editor and copy and paste to the CLI. Thanks.