util/prosodyctl/shell.lua
changeset 13487 7b070909bd15
parent 13402 4ba11c2b915a
equal deleted inserted replaced
13486:4d697961546d 13487:7b070909bd15
    81 		if arg[2] then
    81 		if arg[2] then
    82 			local fmt = { "%s"; ":%s("; ")" };
    82 			local fmt = { "%s"; ":%s("; ")" };
    83 			for i = 3, #arg do
    83 			for i = 3, #arg do
    84 				if arg[i]:sub(1, 1) == ":" then
    84 				if arg[i]:sub(1, 1) == ":" then
    85 					table.insert(fmt, i, ")%s(");
    85 					table.insert(fmt, i, ")%s(");
    86 				elseif i > 3 and fmt[i - 1] == "%q" then
    86 				elseif i > 3 and fmt[i - 1]:match("%%q$") then
    87 					table.insert(fmt, i, ", %q");
    87 					table.insert(fmt, i, ", %q");
    88 				else
    88 				else
    89 					table.insert(fmt, i, "%q");
    89 					table.insert(fmt, i, "%q");
    90 				end
    90 				end
    91 			end
    91 			end