On Thu, Apr 3, 2008 at 7:54 PM, Sibte Abbas <
sibtay@gmail.com> wrote:
I wonder whether it wouldn't be safer and more convenient if we defined
'\# n' as pulling command n into the edit buffer, rather than
immediately executing it. Actual execution is only a <return> away,
but this definition would allow you to edit the command a bit more
before you execute it --- including \e to use an editor. It also
closes the loop in terms of providing some confidence that you typed
the number you should have typed.
This makes more sense and also appears to be much safer. I will start modifying the patch as per this approach now.
Based on your feedback I have modified the attached patch as follows:
1) \# n opens command n into the edit buffer.
2) A new psql variable; SHOW_LINE_NO is added, which is consulted by the \s command.
If it is set, \s prefixs each line of its output with an incrementing line number.
regards,
-- Sibte Abbas