summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/complete.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-06-05 22:01:23 +0800
committerOpportunityLiu <[email protected]>2019-06-05 22:01:23 +0800
commit34cf94bc1650a6e909e9fa3ee88d5cc3cb46eec2 (patch)
treec510bcddd80285e3f8c3d5e53f6148b4c4b1ea29 /xmake/modules/private/utils/complete.lua
parent9904758b699e35ef5fc0b52b21651e90791b94d2 (diff)
rename to names
Diffstat (limited to 'xmake/modules/private/utils/complete.lua')
-rw-r--r--xmake/modules/private/utils/complete.lua12
1 files changed, 1 insertions, 11 deletions
diff --git a/xmake/modules/private/utils/complete.lua b/xmake/modules/private/utils/complete.lua
index 92ea93e9a..1e51f8d8f 100644
--- a/xmake/modules/private/utils/complete.lua
+++ b/xmake/modules/private/utils/complete.lua
@@ -101,7 +101,7 @@ function main(position, ...)
local tasks = {}
local shortnames = {}
- for _, v in ipairs(task.tasks()) do
+ for _, v in ipairs(task.names()) do
local menu = option.taskmenu(v)
tasks[v] = menu
if menu.shortname then
@@ -117,16 +117,6 @@ function main(position, ...)
local segs = word:split("%s")
local task_name = table.remove(segs, 1) or ""
- local tasks = {}
- local shortnames = {}
- for _, v in ipairs(task.tasks()) do
- local menu = option.taskmenu(v)
- tasks[v] = menu
- if menu.shortname then
- shortnames[menu.shortname] = v
- end
- end
-
if #segs == 0 and not has_space then
if _complete_task(tasks, task_name) then return end
end