Re: [PATCH] Add tab-complete for backslash commands

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker )
Cc: "tanghy(dot)fnst\(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add tab-complete for backslash commands
Date: 2021-09-04 16:42:08
Message-ID: 2726976.1630773728@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:
> I've updated the commitfest entry to Ready for Committer.

I was about to push this but started to have second thoughts about it.
I'm not convinced that offering multiple variant spellings of the same
command is really such a great thing: I'm afraid that it will be more
confusing than helpful. I particularly question why we'd offer both
single- and multiple-character versions, as the single-character
version seems entirely useless from a completion standpoint.

For example, up to now "\o<TAB>" got you "\o ", which isn't amazingly
useful but maybe it serves to confirm that you typed a valid command.
This patch now forces you to choose between alternative spellings
of the exact same command, which is a waste of effort plus it will
make you stop to wonder whether they really are the same command.
It would be much better to either keep the old behavior, or just
immediately complete to "\out " and stay out of the user's way.

So I'd be inclined to take out the single-character versions of any
commands that we offer a longer spelling of. I'm not dead set on that,
but I think the possibility ought to be discussed.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-09-04 17:26:24 Re: prevent immature WAL streaming
Previous Message Alvaro Herrera 2021-09-04 16:22:05 Re: prevent immature WAL streaming