Add escape_string_escape function for expand_escapes

To avoid expanding, tab completion escapes the completion list. But the
escape_string function escapes too much for the expand_escapes code. Add
a function that only escapes the backslashes.
This commit is contained in:
ailin-nemui 2018-11-25 13:41:46 +01:00
commit 7e6e3cd503
3 changed files with 20 additions and 1 deletions

View file

@ -93,6 +93,9 @@ char *ascii_strdown(char *str);
/* Escape all '"', "'" and '\' chars with '\' */
char *escape_string(const char *str);
/* Escape all '\' chars with '\' */
char *escape_string_escape(const char *str);
/* convert all low-ascii (<32) to ^<A..> combinations */
char *show_lowascii(const char *str);