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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy