Fix awful.util.spawn*/.pread deprecation wrappers

- Fix `util.spawn_with_shell`.
 - Provide deprecation wrapper for awful.util.pread.
 - Return in deprecation wrapper for awful.util.spawn*.

Closes https://github.com/awesomeWM/awesome/pull/506.
Closes https://github.com/awesomeWM/awesome/pull/511.
This commit is contained in:
Daniel Hahler 2015-10-10 20:26:07 +02:00
parent b34a653448
commit 4d5a3eb3ba
1 changed files with 8 additions and 3 deletions

View File

@ -16,17 +16,22 @@ function timer(...)
end
--TODO: This is a hack for backwards-compatibility with 3.5, remove!
-- Set awful.util.spawn*
-- Set awful.util.spawn* and awful.util.pread.
local spawn = require("awful.spawn")
util.spawn = function(...)
util.deprecate("awful.spawn")
spawn.spawn(...)
return spawn.spawn(...)
end
util.spawn_with_shell = function(...)
util.deprecate("awful.spawn.with_shell")
spawn.spawn_with_shell(...)
return spawn.with_shell(...)
end
util.pread = function(...)
util.deprecate("awful.spawn.pread")
return spawn.pread(...)
end
return