postgres.git / summary / log / commit / refs
commit ad3aff45f0d302b35d009e525de8a9d0ee9745a9
Author: Robert Haas <rhaas@postgresql.org>
Date: Wed Mar 16 21:46:15 2011 +0000
Tab completion for \pset format and \pset linestyle.
Pavel Stehule
src/bin/psql/tab-complete.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 7019123725d..e72c5b9e994 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2828,6 +2828,24 @@ psql_completion(char *text, int start, int end)
COMPLETE_WITH_LIST(my_list);
}
+ else if (strcmp(prev2_wd, "\\pset") == 0)
+ {
+ if (strcmp(prev_wd, "format") == 0)
+ {
+ static const char *const my_list[] =
+ {"unaligned", "aligned", "wrapped", "html", "latex",
+ "troff-ms", NULL};
+
+ COMPLETE_WITH_LIST(my_list);
+ }
+ else if (strcmp(prev_wd, "linestyle") == 0)
+ {
+ static const char *const my_list[] =
+ {"ascii", "old-ascii", "unicode", NULL};
+
+ COMPLETE_WITH_LIST(my_list);
+ }
+ }
else if (strcmp(prev_wd, "\\set") == 0)
{
matches = complete_from_variables(text, "", "");
[parent: 5f588e20051e]