On Tue, Jan 16, 2018 at 6:44 AM, Geoff Winkless <pgsqlad...@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