Skip to content

Commit d2fa20a

Browse files
committed
Add tab completion for \dx in psql
1 parent 3ed990b commit d2fa20a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bin/psql/tab-complete.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ psql_completion(char *text, int start, int end)
894894
"\\a", "\\connect", "\\conninfo", "\\C", "\\cd", "\\copy", "\\copyright",
895895
"\\d", "\\da", "\\db", "\\dc", "\\dC", "\\dd", "\\dD", "\\des", "\\det", "\\deu", "\\dew", "\\df",
896896
"\\dF", "\\dFd", "\\dFp", "\\dFt", "\\dg", "\\di", "\\dl", "\\dL",
897-
"\\dn", "\\do", "\\dp", "\\drds", "\\ds", "\\dS", "\\dt", "\\dT", "\\dv", "\\du",
897+
"\\dn", "\\do", "\\dp", "\\drds", "\\ds", "\\dS", "\\dt", "\\dT", "\\dv", "\\du", "\\dx",
898898
"\\e", "\\echo", "\\ef", "\\encoding",
899899
"\\f", "\\g", "\\gset", "\\h", "\\help", "\\H", "\\i", "\\ir", "\\l",
900900
"\\lo_import", "\\lo_export", "\\lo_list", "\\lo_unlink",
@@ -3303,6 +3303,8 @@ psql_completion(char *text, int start, int end)
33033303
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
33043304
else if (strncmp(prev_wd, "\\dv", strlen("\\dv")) == 0)
33053305
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
3306+
else if (strncmp(prev_wd, "\\dx", strlen("\\dx")) == 0)
3307+
COMPLETE_WITH_QUERY(Query_for_list_of_extensions);
33063308
else if (strncmp(prev_wd, "\\dm", strlen("\\dm")) == 0)
33073309
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_matviews, NULL);
33083310

0 commit comments

Comments
 (0)