Re: [PATCH] Add support to psql for edit-and-execute-command

2020-05-18 Thread Pavel Stehule
po 18. 5. 2020 v 12:16 odesílatel Joe Wildish napsal: > On 18 May 2020, at 11:09, Pavel Stehule wrote: > > \e is working with not empty line too.You can check > > select 1\e > > Your patch just save skip on end line and \e > > Personally I think so it is good idea > > Thanks. I did not realise th

Re: [PATCH] Add support to psql for edit-and-execute-command

2020-05-18 Thread Joe Wildish
On 18 May 2020, at 11:09, Pavel Stehule wrote: \e is working with not empty line too.You can check select 1\e Your patch just save skip on end line and \e Personally I think so it is good idea Thanks. I did not realise that \e at the end of a line would edit that line. (although you do n

Re: [PATCH] Add support to psql for edit-and-execute-command

2020-05-18 Thread Pavel Stehule
po 18. 5. 2020 v 12:05 odesílatel Joe Wildish napsal: > On 18 May 2020, at 7:08, Oleksandr Shulgin wrote: > > The only difference from \e is that you don't need to jump to the end of > input first, I guess? > > AIUI, \e will edit the last thing in history or a specific line number > from history,

Re: [PATCH] Add support to psql for edit-and-execute-command

2020-05-18 Thread Joe Wildish
On 18 May 2020, at 7:08, Oleksandr Shulgin wrote: The only difference from \e is that you don't need to jump to the end of input first, I guess? AIUI, \e will edit the last thing in history or a specific line number from history, whereas the patch will allow the current line to be edited.

Re: [PATCH] Add support to psql for edit-and-execute-command

2020-05-17 Thread Oleksandr Shulgin
On Mon, May 18, 2020 at 1:30 AM Joe Wildish wrote: > > Attached is a small patch for adding "edit-and-execute-command" readline > support to psql. Bash has this concept and I miss it when using psql. It > allows you to amend the current line in an editor by pressing "v" (when > in vi mode) or "C-

[PATCH] Add support to psql for edit-and-execute-command

2020-05-17 Thread Joe Wildish
_READLINE_H .. don't know if this is acceptable? -JoeFrom a314fa15f6bdf5329d3045d736e02b6835107591 Mon Sep 17 00:00:00 2001 From: Joe Wildish Date: Sun, 17 May 2020 21:57:10 +0100 Subject: [PATCH] Add support to psql for edit-and-execute-command Bash has an edit-and-execute-command Readline function that brings the current l