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

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

"tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com> writes:
> On Sunday, September 5, 2021 1:42 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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.

> I generally agreed with your opinion. But I'm not sure if there's someone
> who'd like to see the list of backslash commands and choose one to use.
> I mean, someone may type '\[tab][tab]' to check all supported backslash commands.

Sure, but he'd still get all the commands, just not all the possible
spellings of each one. And a person who's not sure what's available
is unlikely to be helped by an entry for "\c", because it's entirely
not clear which command that's an abbreviation for.

In any case, my main point is that the primary usage of tab-completion
is as a typing aid, not documentation. I do not think we should make
the behavior less useful for typing in order to be exhaustive on the
documentation side.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2021-09-07 20:05:58 Re: Read-only vs read only vs readonly
Previous Message Justin Pryzby 2021-09-07 19:44:39 Re: Don't clean up LLVM state when exiting in a bad way