Re: psql command line editing

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql command line editing
Date: 2025-02-13 19:11:15
Message-ID: CANzqJaB5nyTnFsneikXnPr9hXTL-7_nRTHoOYjOyF=3mbFQYGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 12, 2025 at 3:29 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 2/12/25 12:03, Ron Johnson wrote:
> > On Wed, Feb 12, 2025 at 2:29 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>
> > There's got to be something in your shell config which says "use emacs
> > keys" instead of "use vi keys".
>
> From man readline:
>
> "By default, the line editing commands are similar to those of emacs. A
> vi-style line editing interface is also available."
>
> To change from the default would involve setting editing-mode in
> /etc/inputrc or ~/.inputrc.
>

It appears that the RHEL default /etc/initrc file defines a bunch of escape
sequences "for linux console and RH/Debian xterm" cursor keys when in emacs
mode.

Our servers are RHEL, my ssh client emulates xterm, and is in the default
emacs mode. Thus, the cursor keys automagically work for me, and I just
learned that I've been in emacs mode this whole time!

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2025-02-13 19:14:10 Re: psql command line editing
Previous Message Thiemo Kellner 2025-02-13 18:44:26 Re: Ideas about presenting data coming from sensors