Re: proposal: alternative psql commands quit and exit

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: proposal: alternative psql commands quit and exit
Дата
Msg-id CA+Tgmob12cF+mF9rr-Y3fs+6QYODdwUxtvBhQeZW=RF4upMEzQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: alternative psql commands quit and exit  (Geoff Winkless <pgsqladmin@geoff.dj>)
Ответы Re: proposal: alternative psql commands quit and exit
Список pgsql-hackers
On Tue, Jan 16, 2018 at 6:44 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
> A quick PoC.
>
> I should say upfront that I've no axe to grind over this, if no-one
> likes the idea I don't mind: I'm not sure I like it myself (it's quite
> an aggressive stance to take, I think) - I just wanted to see if it
> would work, and provide it as a working possibility.
>
> Basically, I intercept every keypress before we send it to readline.
> If it's 4 (Ctrl-D) we replace the buffer with \q<lf> which then quits,
> even if there's something in the buffer. So simply sending "Ctrl-D to
> quit" would always be true. Everything else just gets passed through
> to readline directly.

This is an impressive attempt to make it possible to write a short and
universally correct help text, but (1) I doubt that we want to
override the user's terminal settings and (2) it won't work on
non-readline builds.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: proposal: alternative psql commands quit and exit
Следующее
От: Robert Haas
Дата:
Сообщение: Re: let's not complain about harmless patch-apply failures