Re: psql command line editing
От | Tom Lane |
---|---|
Тема | Re: psql command line editing |
Дата | |
Msg-id | 3370941.1739388555@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: psql command line editing (Ron Johnson <ronljohnsonjr@gmail.com>) |
Ответы |
Re: psql command line editing
Re: psql command line editing |
Список | pgsql-general |
Ron Johnson <ronljohnsonjr@gmail.com> writes: > On Wed, Feb 12, 2025 at 1:50 PM Rich Shepard <rshepard@appl-ecosys.com> > wrote: >> My web searches suggest that using the psql command line I'm limited to >> moving the cursor one character at a time. Is there a way to use a small >> editor, e.g., joe on linux, to move by words or to the begining and end of >> the line? > The PGDG prebuilt packages are built with libreadline. Thus, if that's how > you installed psql, Home, End, Ctrl-Left, Ctrl-Right and Ctrl-w should work. 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. As Adrian notes, there's also \e, which is good for entering or editing multi-line queries. regards, tom lane
В списке pgsql-general по дате отправления: