awful.util.spawn_with_shell: Use table as argument

Thanks to the previous commit, spawn_with_shell() can now easily fix lots of
problems that we previously had with escaping the argument to the shell.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-03-10 15:00:05 +01:00
parent 3c40d6b470
commit 4540b8927a
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ end
-- @param screen The screen where to run the command. -- @param screen The screen where to run the command.
function util.spawn_with_shell(cmd, screen) function util.spawn_with_shell(cmd, screen)
if cmd and cmd ~= "" then if cmd and cmd ~= "" then
cmd = util.shell .. " -c \"" .. cmd .. "\"" cmd = { util.shell, "-c", cmd }
return capi.awesome.spawn(cmd, false, screen or capi.mouse.screen) return capi.awesome.spawn(cmd, false, screen or capi.mouse.screen)
end end
end end