summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-08-03 10:03:14 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-08-03 10:03:14 +0100
commitc4f0c4dee6d258992977c445b696dec64b58aa8e (patch)
treeba50867e520cc2269f3d9d161125ef8de74e9f1d /src/command_manager.cc
parent8ee2aa9ba74e7daa473c2ada96516007cc24c9ce (diff)
Change escaping method for command completion
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index c1d43e2e..96f4cb09 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -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;
}