complete.cpp: don't double escape commands in complete output

The argument to --command was escaped both here and in
append_switch(), potentially producing incorrect output
This commit is contained in:
Aaron Gyes
2019-09-18 16:19:59 -07:00
parent eea3bd5fc3
commit f35e18bb9b

View File

@@ -1699,8 +1699,7 @@ wcstring complete_print() {
}
append_format(out, L"complete%ls", modestr);
append_switch(out, e.cmd_is_path ? L"path" : L"command",
escape_string(e.cmd, ESCAPE_ALL));
append_switch(out, e.cmd_is_path ? L"path" : L"command", e.cmd);
switch (o.type) {
case option_type_args_only: {