diff options
| author | ruki <[email protected]> | 2019-06-06 09:44:06 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-06 09:44:06 +0800 |
| commit | 9a4b1a46cd079a42238b7d2366a1e59e46a8afea (patch) | |
| tree | 06057be0b18b8a33fa7927ae8f978ace76983f7e /xmake/core | |
| parent | 84e1151a89aefa2da12de34f763e36fda95eb2e4 (diff) | |
| parent | 34cf94bc1650a6e909e9fa3ee88d5cc3cb46eec2 (diff) | |
Merge pull request #443 from OpportunityLiu/tap-completion
Tab completion support
Diffstat (limited to 'xmake/core')
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/base/task.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/import/core/base/task.lua b/xmake/core/sandbox/modules/import/core/base/task.lua index d6cdcef01..030780102 100644 --- a/xmake/core/sandbox/modules/import/core/base/task.lua +++ b/xmake/core/sandbox/modules/import/core/base/task.lua @@ -54,7 +54,7 @@ function sandbox_core_base_task.run(taskname, options, ...) -- get task instance local taskname = option.taskname() or "build" - local taskinst = project.task(taskname) or task.task(taskname) + local taskinst = project.task(taskname) or task.task(taskname) if not taskinst then raise("do unknown task(%s)!", taskname) end @@ -69,5 +69,14 @@ function sandbox_core_base_task.run(taskname, options, ...) option.restore() end + +function sandbox_core_base_task.names() + local names = {} + for k, _ in pairs(task.tasks()) do + table.insert(names, k) + end + return names +end + -- return module return sandbox_core_base_task |
