RE: [PATCH] Add tab-complete for backslash commands
tanghy.fnst@fujitsu.com <tanghy.fnst@fujitsu.com>
From: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-08T10:07:38Z
Lists: pgsql-hackers
Attachments
- v3-0001-Replace-the-single-character-with-multiple-charac.patch (application/octet-stream) patch v3-0001
On Wednesday, September 8, 2021 5:05 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >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. You are right. I think I've got your point. Here is the updated patch in which I added the multiple-character versions for backslash commands and remove their corresponding single-character version. Of course, for backslash commands with only single-character version, no change added. BTW, I've done the existing tap-tests for tab-completion with this patch, all tests passed. Regards, Tang
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