Skip to content

Commit 095d401

Browse files
committed
Tab complete second argument to \c with role names.
Ian Barwick
1 parent 67067f9 commit 095d401

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
@@ -3704,6 +3704,8 @@ psql_completion(const char *text, int start, int end)
37043704
}
37053705
else if (strcmp(prev_wd, "\\connect") == 0 || strcmp(prev_wd, "\\c") == 0)
37063706
COMPLETE_WITH_QUERY(Query_for_list_of_databases);
3707+
else if (strcmp(prev2_wd, "\\connect") == 0 || strcmp(prev2_wd, "\\c") == 0)
3708+
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
37073709

37083710
else if (strncmp(prev_wd, "\\da", strlen("\\da")) == 0)
37093711
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_aggregates, NULL);

0 commit comments

Comments
 (0)