Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ad3aff4

Browse files
committed
Tab completion for \pset format and \pset linestyle.
Pavel Stehule
1 parent 5f588e2 commit ad3aff4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/bin/psql/tab-complete.c

+18
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,24 @@ psql_completion(char *text, int start, int end)
28282828

28292829
COMPLETE_WITH_LIST(my_list);
28302830
}
2831+
else if (strcmp(prev2_wd, "\\pset") == 0)
2832+
{
2833+
if (strcmp(prev_wd, "format") == 0)
2834+
{
2835+
static const char *const my_list[] =
2836+
{"unaligned", "aligned", "wrapped", "html", "latex",
2837+
"troff-ms", NULL};
2838+
2839+
COMPLETE_WITH_LIST(my_list);
2840+
}
2841+
else if (strcmp(prev_wd, "linestyle") == 0)
2842+
{
2843+
static const char *const my_list[] =
2844+
{"ascii", "old-ascii", "unicode", NULL};
2845+
2846+
COMPLETE_WITH_LIST(my_list);
2847+
}
2848+
}
28312849
else if (strcmp(prev_wd, "\\set") == 0)
28322850
{
28332851
matches = complete_from_variables(text, "", "");

0 commit comments

Comments
 (0)