Skip to content

Commit 62e28b3

Browse files
committed
Add tab completion for \dx in psql
1 parent 229fb58 commit 62e28b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bin/psql/tab-complete.c

+3-1
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",
@@ -3320,6 +3320,8 @@ psql_completion(char *text, int start, int end)
33203320
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
33213321
else if (strncmp(prev_wd, "\\dv", strlen("\\dv")) == 0)
33223322
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
3323+
else if (strncmp(prev_wd, "\\dx", strlen("\\dx")) == 0)
3324+
COMPLETE_WITH_QUERY(Query_for_list_of_extensions);
33233325
else if (strncmp(prev_wd, "\\dm", strlen("\\dm")) == 0)
33243326
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_matviews, NULL);
33253327

0 commit comments

Comments
 (0)