Thread: pgsql: psql: when tab-completing, use quotes on file names that need th

pgsql: psql: when tab-completing, use quotes on file names that need th

From
Alvaro Herrera
Date:
psql: when tab-completing, use quotes on file names that need them

psql backslash commands that deal with file or directory names require
quotes around those that have spaces, single quotes, or backslashes.
However, tab-completing such names does not provide said quotes, and is
thus almost useless with them.

This patch fixes the problem by having a wrapper function around
rl_filename_completion_function that dequotes on input and quotes on
output.  This eases dealing with such names.

Author: Noah Misch

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/41e3c94cac0e68257126b2d264dc5e877e892490

Modified Files
--------------
src/bin/psql/stringutils.c  |   69 +++++++++++++++++++++++++++++++++++++++++++
src/bin/psql/stringutils.h  |    3 ++
src/bin/psql/tab-complete.c |   58 ++++++++++++++++++++++++++++++++++-
3 files changed, 128 insertions(+), 2 deletions(-)