From 34cf94bc1650a6e909e9fa3ee88d5cc3cb46eec2 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Wed, 5 Jun 2019 22:01:23 +0800 Subject: rename to names --- xmake/modules/private/utils/complete.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'xmake/modules') 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 -- cgit v1.3.1