Break the argument escaping code into a separate function and use it to

escape key bindings in list-keys. Also escape ~ and ; and $ properly.
This commit is contained in:
nicm
2019-05-23 14:03:44 +00:00
parent 3e3eb1dd0f
commit 27bfb56ad5
7 changed files with 65 additions and 35 deletions

View File

@ -122,7 +122,7 @@ options_value_tostring(struct options_entry *o, union options_value *ov,
char *s;
if (OPTIONS_IS_COMMAND(o))
return (cmd_list_print(ov->cmdlist));
return (cmd_list_print(ov->cmdlist, 0));
if (OPTIONS_IS_STYLE(o))
return (xstrdup(style_tostring(&ov->style)));
if (OPTIONS_IS_NUMBER(o)) {