mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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
This commit is contained in:
@ -19,4 +19,7 @@ extern char *strtokx(const char *s,
|
||||
bool del_quotes,
|
||||
int encoding);
|
||||
|
||||
extern char *quote_if_needed(const char *source, const char *entails_quote,
|
||||
char quote, char escape, int encoding);
|
||||
|
||||
#endif /* STRINGUTILS_H */
|
||||
|
Reference in New Issue
Block a user