Content-Length: 259930 | pFad | http://github.com/postgrespro/postgres/commit/8019b5a89c3cefbaa69ab58c00281419f7e46601

1E Improve psql's tab completion for \l. · postgrespro/postgres@8019b5a · GitHub
Skip to content

Commit 8019b5a

Browse files
committed
Improve psql's tab completion for \l.
Offer a list of database names; formerly no help was offered. Ian Barwick, reviewed by Gerdan Santos Patch: <5724132E.1030804@2ndquadrant.com>
1 parent 49917db commit 8019b5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,6 +3033,8 @@ psql_completion(const char *text, int start, int end)
30333033
COMPLETE_WITH_QUERY(Query_for_list_of_encodings);
30343034
else if (TailMatchesCS1("\\h") || TailMatchesCS1("\\help"))
30353035
COMPLETE_WITH_LIST(sql_commands);
3036+
else if (TailMatchesCS1("\\l*") && !TailMatchesCS1("\\lo*"))
3037+
COMPLETE_WITH_QUERY(Query_for_list_of_databases);
30363038
else if (TailMatchesCS1("\\password"))
30373039
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
30383040
else if (TailMatchesCS1("\\pset"))

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/8019b5a89c3cefbaa69ab58c00281419f7e46601

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy