From 28c16dd888d04a11b99bbdf49607b87f11a4ff9d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 19 Jun 2008 09:14:54 +0200 Subject: [PATCH] awful: better eval() Signed-off-by: Julien Danjou --- awful.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awful.lua b/awful.lua index 41d2600e..800ebe8b 100644 --- a/awful.lua +++ b/awful.lua @@ -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)