summaryrefslogtreecommitdiff
path: root/xmake/plugins/lua/xmake.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-06-05 14:17:11 +0800
committerOpportunityLiu <[email protected]>2019-06-05 14:17:11 +0800
commit1b5017a88667c5af7a4afd4311d4861eb540b1bb (patch)
tree926c7a07f0bae03d9c78dd94350834227828321d /xmake/plugins/lua/xmake.lua
parent06dba0daf4968b9632ebc00a9018c6af044422df (diff)
tab completion
Diffstat (limited to 'xmake/plugins/lua/xmake.lua')
-rw-r--r--xmake/plugins/lua/xmake.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua
index 636ef67b8..11fce7a20 100644
--- a/xmake/plugins/lua/xmake.lua
+++ b/xmake/plugins/lua/xmake.lua
@@ -73,13 +73,15 @@ task("lua")
break
end
end
+ local result = nil
if object then
-- run builtin modules (xmake lua core.xxx.xxx)
- print(object(unpack(option.get("arguments") or {})))
+ result = object(unpack(option.get("arguments") or {}))
else
-- run imported modules (xmake lua core.xxx.xxx)
- print(import(script, {anonymous = true})(unpack(option.get("arguments") or {})))
+ result = import(script, {anonymous = true})(unpack(option.get("arguments") or {}))
end
+ if result ~= nil then print(result) end
end
else
-- enter interactive mode