aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2014-09-12 12:04:37 -0400
committerStephen Frost <sfrost@snowman.net>2014-09-12 12:04:37 -0400
commita2dabf0e1dda93c860b10bff7b73617e7b090108 (patch)
tree9f53e54cfd0537dae516d792504d467fa30d4ab2 /src/bin/psql/tab-complete.c
parent82962838d4bea2a20babbd2efacb48b268b4a689 (diff)
downloadpostgresql-a2dabf0e1dda93c860b10bff7b73617e7b090108.tar.gz
postgresql-a2dabf0e1dda93c860b10bff7b73617e7b090108.zip
Add unicode_{column|header|border}_style to psql
With the unicode linestyle, this adds support to control if the column, header, or border style should be single or double line unicode characters. The default remains 'single'. In passing, clean up the border documentation and address some minor formatting/spelling issues. Pavel Stehule, with some additional changes by me.
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r--src/bin/psql/tab-complete.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 4ce47e99ef5..b80fe131683 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3622,7 +3622,8 @@ psql_completion(const char *text, int start, int end)
{"border", "columns", "expanded", "fieldsep", "fieldsep_zero",
"footer", "format", "linestyle", "null", "numericlocale",
"pager", "recordsep", "recordsep_zero", "tableattr", "title",
- "tuples_only", NULL};
+ "tuples_only", "unicode_border_linestyle",
+ "unicode_column_linestyle", "unicode_header_linestyle", NULL};
COMPLETE_WITH_LIST_CS(my_list);
}
@@ -3643,6 +3644,16 @@ psql_completion(const char *text, int start, int end)
COMPLETE_WITH_LIST_CS(my_list);
}
+ else if (strcmp(prev_wd, "unicode_border_linestyle") == 0 ||
+ strcmp(prev_wd, "unicode_column_linestyle") == 0 ||
+ strcmp(prev_wd, "unicode_header_linestyle") == 0)
+ {
+ static const char *const my_list[] =
+ {"single", "double", NULL};
+
+ COMPLETE_WITH_LIST_CS(my_list);
+
+ }
}
else if (strcmp(prev_wd, "\\unset") == 0)
{