Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tiecX-000oiQ-Df for pgsql-general@arkaria.postgresql.org; Thu, 13 Feb 2025 19:11:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tiecV-00CvwP-5m for pgsql-general@arkaria.postgresql.org; Thu, 13 Feb 2025 19:11:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tiecU-00CvwH-Rm for pgsql-general@lists.postgresql.org; Thu, 13 Feb 2025 19:11:31 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tiecT-000fUX-1A for pgsql-general@postgresql.org; Thu, 13 Feb 2025 19:11:31 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5fca38e7be6so390867eaf.0 for ; Thu, 13 Feb 2025 11:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739473887; x=1740078687; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=7WCrEZHixzDWHNRiW5pKF3bGF1y08U1FrPpJ6PMTUdI=; b=IoVOT7+AB3H65ax/iDZ304qUSwswrJ33l05sjb3lnT7Bp5LX0KPsZuX7bFgfy7879w +MkkMNGv4dR/wdBhTpUlWCAXr7cFt0NN78MmpCjZ31DJ9fTbZqMo7NTHpKgE6/YxEx4/ QEarPlxkCxhVUW8zf+WyoGPWvA+7RMY6qc1W+FHQtBJxXbg1UWmuzfn6vR+Yqi0cgNsJ kWY3h84c6Lvdmww4w31/Re4kvj9yZBD5qBM8u80tysOHilJd0VaxNXU2QlpRyP0hfnJr 969rA9u9B545goq3yLc0ATeANITjWhL2KlS4DBtyH9eQ2/rSBOZ3IFHsGuZertTtS5hy 93Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739473887; x=1740078687; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7WCrEZHixzDWHNRiW5pKF3bGF1y08U1FrPpJ6PMTUdI=; b=PDabEC+qLgXJjt6aGYmz7qdQKQGcZytaJSHFnOIlIHZawgwSvWeyBbR0sKVPy2V8xp em/QDwVtZBe+mzb1j2q/zGI0mF/r9NX2UxkOsz4y6XfMo2PKwbRy1Orldd+InSrGTcfD 9e68p8seEECL+lsw9SQqN71Zstukxniqg4V9IoxdxIm8tRWRDLuFtUhBf9wViZaBB/T9 b2jeYIMnXQ1oNVOVVb1c1ICbByve+lP+9tP2w2Xc1Sggix59TFCDDMtV/3NtLtzEslj0 Q6LyAkz4NYgqxgcd8VEOm7y484DaJaI5wm01WODId7Sdb0/3M75iyXWvXyUnnSaiZ+yE twsA== X-Gm-Message-State: AOJu0YwhFW7pmZyl1TN6PqmKZnYZd1pI0GPJbtv3RSOy7yUwX5mWClhw NpROfjOmAZtW6pSutqb9bc3IVT+ApqPcr2ZHJBPv1D6IrBnJrwbZWaRZ5FHISqYsJjw4aOl5qFg QSEHTSjhjvQmBm2X6mBqEFk8RXTdpUA== X-Gm-Gg: ASbGncsXFjFq0n3Jx6taOSBgUAkbVuFG2qTBRHdv5KgiFRd7ouBXhXtqBIASOqPQBQw Y9fGgIQM371ISIZhlu5WTYnhPngVLwxr3575VGwq87LJPxV+yBKSF9zt39u76jznHxFDDuRBGWQ == X-Google-Smtp-Source: AGHT+IH/HLlbZ/h/KYA9t5iMXcuumLAQupKpHXQY1U+TwcMP7GTZRM0t80Y6EimSe8cwAfRgk4ABDrHl+8BE/yotLlI= X-Received: by 2002:a05:6871:22c6:b0:29e:5e83:150e with SMTP id 586e51a60fabf-2b8d6847575mr5345693fac.27.1739473887136; Thu, 13 Feb 2025 11:11:27 -0800 (PST) MIME-Version: 1.0 References: <61255ab-6249-1226-7db6-4ecc3e4c127b@appl-ecosys.com> <3370941.1739388555@sss.pgh.pa.us> <4e1966c1-1f24-47e5-9c87-8cf466216b6b@aklaver.com> In-Reply-To: <4e1966c1-1f24-47e5-9c87-8cf466216b6b@aklaver.com> From: Ron Johnson Date: Thu, 13 Feb 2025 14:11:15 -0500 X-Gm-Features: AWEUYZn9SyeSDPZPFMk03LKKgOrY0cD9ZHKcVlxoIuzQc8PqKMbp9fcssKxGxO0 Message-ID: Subject: Re: psql command line editing To: pgsql-general Content-Type: multipart/alternative; boundary="0000000000002395ab062e0ad315" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002395ab062e0ad315 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 12, 2025 at 3:29=E2=80=AFPM Adrian Klaver wrote: > On 2/12/25 12:03, Ron Johnson wrote: > > On Wed, Feb 12, 2025 at 2:29=E2=80=AFPM Tom Lane > > 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! --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000002395ab062e0ad315 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Feb 12, 2025 at 3:29=E2=80=AFPM A= drian Klaver <adrian.klaver= @aklaver.com> wrote:
On 2/12/25 12:03, = Ron Johnson wrote:
> On Wed, Feb 12, 2025 at 2:29=E2=80=AFPM Tom Lane <tgl@sss.pgh.pa.us
> <mailto:tgl@= sss.pgh.pa.us>> wrote:

> There's got to be something in your shell config which says "= use emacs
> keys" instead of "use vi keys".

=C2=A0From man readline:

"By default, the line editing commands are similar to those of emacs.= =C2=A0 A
=C2=A0 vi-style line editing interface is also available."

To change from the default would involve setting editing-mode in
/etc/inputrc or=C2=A0 ~/.inputrc.

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

Our servers are RHEL, my ssh client e= mulates xterm, and is in the default emacs mode.=C2=A0 Thus, the cursor key= s 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!
--0000000000002395ab062e0ad315--