Re: psql possible TODO

From: Jeremy Drake <pgsql(at)jdrake(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql possible TODO
Date: 2006-12-05 23:07:44
Message-ID: Pine.BSO.4.64.0612051504300.28611@resin.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 5 Dec 2006, Joshua D. Drake wrote:

>
> > > > Just like bash.
> > >
> > > What we have is just like bash --- at least the parts of it that I use.
> >
> > This reminds me of the old csh function where you could recall things by
> > numbers and do search/replace on them. The capability was so hard to
> > use I could imagine anyone _normal_ using it.
>
> Except that this has nothing to do with that. This is *standard* feature
> set for the unix shell:
>
> 804 history
> 805 joe bin/starttest.sh
> 806 history
>
> Oh... that's right, its call starttest.sh:
>
> !805
>
> Except for PostgreSQL it would be:
>
> postgres=# \s
>
> 1 SELECT * from cmd_pg_stat_all_tables ;
> 2 SELECT count(*) from cmd_pg_stat_all_tables ;
> 3 SELECT count(*) from cmd_pg_stat_database;
>
> postgres=# !1
>

Make sure if you do this you support the other variant. Ie, in bash
instead of !806 you could have said !-2, which is execute the second to
last command.

And how about
$ ls *.foo
...
$ ^ls^rm

?

:)

>
> Sincerely,
>
> Joshua D. Drake
>
>
>
>
> >
>

--
Economics is extremely useful as a form of employment for economists.
-- John Kenneth Galbraith

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-12-05 23:08:57 Re: psql possible TODO
Previous Message Joshua D. Drake 2006-12-05 23:07:27 Re: psql possible TODO