Re: [PATCH] Add tab-complete for backslash commands
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-07T20:05:24Z
Lists: 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
Commits
-
In psql tab completion, offer spelled-out commands not abbreviations.
- 7cffa2ed0c9f 15.0 landed
-
Minor improvements for psql help output.
- ac5ea660996e 15.0 landed
- 5edbcbd5b94c 14.0 landed