summaryrefslogtreecommitdiff
path: root/src/commands.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-01-17 22:55:48 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-01-17 22:55:48 +0000
commit7cdeb3d7f70790b70ff5a1ecafeaa8d4e6e69c76 (patch)
treef1c612882b738a1156c644e4408d44e1a909d598 /src/commands.cc
parent32319aca45265453baad756bf406e34a4568d169 (diff)
simplify echo code, avoid trailing spaces
Diffstat (limited to 'src/commands.cc')
-rw-r--r--src/commands.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 8373bddd..23cf03e8 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -780,9 +780,7 @@ const CommandDesc echo_cmd = {
CommandCompleter{},
[](const ParametersParser& parser, Context& context)
{
- String message;
- for (auto& param : parser)
- message += param + " ";
+ String message = join(parser, ' ', false);
if (parser.has_option("debug"))
write_debug(message);
else