Re: [PATCH] Add tab-complete for backslash commands - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Add tab-complete for backslash commands
Date
Msg-id 3212818.1631045124@sss.pgh.pa.us
Whole thread Raw
In response to RE: [PATCH] Add tab-complete for backslash commands  ("tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>)
Responses RE: [PATCH] Add tab-complete for backslash commands
List pgsql-hackers
"tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com> writes:
> On Sunday, September 5, 2021 1:42 AM, Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: The Free Space Map: Problems and Opportunities
Next
From: Magnus Hagander
Date:
Subject: Re: Read-only vs read only vs readonly