Change escaping method for command completion

This commit is contained in:
Maxime Coste 2014-08-03 10:03:14 +01:00
parent 8ee2aa9ba7
commit c4f0c4dee6

View File

@ -580,10 +580,7 @@ Completions CommandManager::complete(const Context& context,
completions.end += start;
for (auto& candidate : completions.candidates)
{
if (candidate.find_first_of(" \t;\"'") != String::npos)
candidate = '"' + escape(candidate, '"', '\\') + '"';
}
candidate = escape(candidate, " \t;", '\\');
return completions;
}