From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Peter Mount <peter(at)retep(dot)org(dot)uk> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql and readline |
Date: | 2003-01-10 07:49:05 |
Message-ID: | 20030110074905.GA2820@wallace.ece.rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 10, 2003 at 07:15:34AM +0000, Peter Mount wrote:
> On Thu, 9 Jan 2003, Peter Eisentraut wrote:
>
> > Tom Lane writes:
> >
> > > The case I find interesting is where you're using plain "\e" to
> > > re-edit a query interactively. If this query never gets into the
> > > history buffer then you're lost: you won't be able to pull it back
> > > for re-editing a second time.
> >
> > If you call \e again immediately then you edit the previous command.
>
> Yes, but it's not always the last command you want :-(
I already posted a one-line patch to implement this, but it doesn't
seem to hve come through to the list. Here it is inline, instead of as
an attachment:
Index: src/bin/psql/command.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/command.c,v
retrieving revision 1.84
diff -u -r1.84 command.c
--- src/bin/psql/command.c 2002/10/23 19:23:56 1.84
+++ src/bin/psql/command.c 2003/01/09 22:18:49
@@ -1639,6 +1639,7 @@
error = true;
}
+ replace_history_entry(where_history(),query_buf->data,NULL);
fclose(stream);
}
----------------------------------------------------------------
Ross
From | Date | Subject | |
---|---|---|---|
Next Message | kedar hukeri | 2003-01-10 07:54:23 | unsubscrieb |
Previous Message | Peter Mount | 2003-01-10 07:15:34 | Re: psql and readline |