pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@lists.postgresql.org
Subject: External psql editor
Date: Fri, 29 Apr 2022 08:55:37 -0700 (PDT)
Message-ID: <edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com> (raw)

I do all my postgres work using the psql shell. Editing a command reguires
moving character-by-character and I'd like to use my small text editor (joe)
because it allows more control over line movement.

A web search found a stackexchange thread that suggested adding to
~/.bash_profile the line:
export PSQL_EDITOR=/usr/bin/joe
so I did this yesterday.

Today I've learned that the keyboard chords I use in joe in other
applications aren't working here. For example, C-w should delete the word to
the right of the point (cursor location). It doesn't. Instead, it deletes
from the cursor postion to the head of the line. C-x doesn't move the cursor
one word to the right, but cancels the command.

Is there a way for me to specify use of joe at the psql command line? (I'd
use emacs but that's gross overkill.)

Regards,

Rich





view thread (26+ messages)  latest in thread

Message-ID: <edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com>
Permalink:  ../edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com/
Also on:    postgresql.org/message-id/edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rshepard@appl-ecosys.com
  Subject: Re: External psql editor
  In-Reply-To: <edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com>
  References: <edf1cfa4-35bf-66bf-4de2-7a3bbcb6c5e4@appl-ecosys.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox