exec concat all its arguments instead of accepting only one

This commit is contained in:
Maxime Coste 2012-10-10 19:15:09 +02:00
parent ffba94fcde
commit dae8f65308

View File

@ -691,10 +691,15 @@ void exec_keys(const KeyList& keys, Context& context)
void exec_string(const CommandParameters& params, Context& context) void exec_string(const CommandParameters& params, Context& context)
{ {
if (params.size() != 1) if (params.empty())
throw wrong_argument_count(); throw wrong_argument_count();
KeyList keys = parse_keys(params[0]); KeyList keys;
for (auto& param : params)
{
KeyList param_keys = parse_keys(param);
keys.insert(keys.end(), param_keys.begin(), param_keys.end());
}
exec_keys(keys, context); exec_keys(keys, context);
} }