summaryrefslogtreecommitdiff
path: root/xmake/plugins/lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-06 09:44:06 +0800
committerGitHub <[email protected]>2019-06-06 09:44:06 +0800
commit9a4b1a46cd079a42238b7d2366a1e59e46a8afea (patch)
tree06057be0b18b8a33fa7927ae8f978ace76983f7e /xmake/plugins/lua
parent84e1151a89aefa2da12de34f763e36fda95eb2e4 (diff)
parent34cf94bc1650a6e909e9fa3ee88d5cc3cb46eec2 (diff)
Merge pull request #443 from OpportunityLiu/tap-completion
Tab completion support
Diffstat (limited to 'xmake/plugins/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