From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql command line editing |
Date: | 2025-02-12 19:50:49 |
Message-ID: | 5b2fd208-88d8-4903-a359-884bd838a8f3@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2/12/25 11:44, Rich Shepard wrote:
> On Wed, 12 Feb 2025, Tom Lane wrote:
>
>> On my machine, Ctrl-Left/Right don't seem to do anything, but the usual
>> Emacs combinations Ctrl-A, Ctrl-E, Escape-B, Escape-F and so on work in
>> psql. I don't believe I did anything special to configure that. Check
>> your
>> local readline documentation.
>
> Tom,
>
> I run psql from a urxvt virtual console, not emacs (which is where I write
> scripts.)
The point Tom was making is that psql uses readline for it's editing
positioning and that for him Emacs movement commands work in psql.
>
>> As Adrian notes, there's also \e, which is good for entering
>> or editing multi-line queries.
>
> Often when updating table rows I'll modify one string and the row ID so
> I'll
> learn to use \e to move around the string.
>
> Many thanks,
>
> Rich
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Shepard | 2025-02-12 19:54:47 | Re: psql command line editing |
Previous Message | Rich Shepard | 2025-02-12 19:44:29 | Re: psql command line editing |