diff options
| author | OpportunityLiu <[email protected]> | 2019-06-05 14:17:11 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-05 14:17:11 +0800 |
| commit | 1b5017a88667c5af7a4afd4311d4861eb540b1bb (patch) | |
| tree | 926c7a07f0bae03d9c78dd94350834227828321d /xmake/plugins/lua | |
| parent | 06dba0daf4968b9632ebc00a9018c6af044422df (diff) | |
tab completion
Diffstat (limited to 'xmake/plugins/lua')
| -rw-r--r-- | xmake/plugins/lua/xmake.lua | 6 |
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 |
