Re: proposal: alternative psql commands quit and exit

From: Arthur Nascimento <tureba(at)gmail(dot)com>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: proposal: alternative psql commands quit and exit
Date: 2017-12-12 16:36:22
Message-ID: CALVFHFb-C_5_94hueWg6Dd0zu7TfbpT7hzsh9Zf0DEDOSaAnfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 December 2017 at 13:04, Jeremy Finzel <finzelj(at)gmail(dot)com> wrote:
> FWIW I am +1 in favor of not overcomplicating the special psql commands and
> keep to the "\" standard.

I find the general rule of \ starts a client command and anything else
starts a server command to be very good to begin with. The 'help' is
an ugly exception to the rule and I wouldn't like to see it expanding.
If it were up to me, I'd rename 'help' to '\help' and add '\q' to the
initial welcome message.

Of course, that wouldn't be accepted and it wouldn't solve the SO
statistics or the OP's complaint. It's been already established that
we're now trying to cater to a special kind of user - not the one who
doesn't want/have time to read the docs - but the one who didn't even
read the start message or who read it and forgot what it was after a
screen full of content has passed, then went to SO instead of the
docs. (I'm not criticizing - just trying to paint a clear picture of
the goal here.) And since I view the lonely exit|quit in an uglier
solution still, how about this idea:

Nano keeps a cheatsheet of commands on the bottom; and it's regarded
as a fairly good editor for newcomers. Some shells have a right-hand
side status bar. And even vim these days shows several lines of
explanation of :q if you open it alone. If psql had a right-hand side
status bar that defaulted to a short cheatsheet-like message like the
initial "type 'help' for help and '\q' to quit" (perhaps empty if
started with quiet), then it would follow new users around on every
new command, so they would always know how to quit or ask for help. I
think the message mentioning '\q' instead of 'quit' is important
anyway since it works even on a dirty buffer. And experienced users
already set their status lines anyway, so they would have an extra
status space on the right for general things; perhaps RPROMPT, as zsh
calls it. I'd rather have SO fill with "how to change the right prompt
in psql" than "how to quit psql" since then we're talking about
different user profiles.

Tureba - Arthur Nascimento

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Everaldo Canuto 2017-12-12 16:39:30 Re: proposal: alternative psql commands quit and exit
Previous Message Peter Eisentraut 2017-12-12 16:30:51 Re: Boolean partitions syntax