Re: psql and readline

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Eric B(dot)Ridge" <ebr(at)tcdi(dot)com>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql and readline
Date: 2003-01-15 23:45:22
Message-ID: Pine.LNX.4.44.0301152043280.789-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Eric B.Ridge writes:

> What about expanding the history capabilities of psql's history command
> (\s) to include something more bash/tcsh-like? For example:
> !insert
> -- execute the last command that began with "insert"
> !23
> -- execute item #23 in my history

If you peruse the documentation of the readline and history libraries you
should find that those features already exist. For example, you can use
C-r and C-s to search through the history. AFAIK, bash just uses readline
as is, so anything that works there should work for psql as well.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Clift 2003-01-16 00:54:49 Re: Anyone have a fresh Solaris 8 SPARC system to create
Previous Message Peter Eisentraut 2003-01-15 23:44:14 Re: SQL flagger