awful: better eval()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-19 09:14:54 +02:00
parent 85dbc8fd01
commit 28c16dd888

View file

@ -450,8 +450,8 @@ local function spawn(cmd)
return os.execute(cmd .. "&")
end
local function eval(cmd)
assert(loadstring(cmd))()
local function eval(s)
return assert(loadstring("return" ..s))()
end
local function menu_completion_bash(command, cur_pos, ncomp)