Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2
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)