diff options
| author | ruki <[email protected]> | 2020-05-29 22:44:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-29 10:29:06 +0800 |
| commit | b97000a954e935efa53de7327178caf1a740f7d0 (patch) | |
| tree | c81a9014e006b83ff5bd072704d0d4e27be4d0ab /xmake/plugins/show/lists/toolchains.lua | |
| parent | 38c79adcfe3e0d29e1da7b10f3f51bfdbdab8bc6 (diff) | |
improve to show toolchains
Diffstat (limited to 'xmake/plugins/show/lists/toolchains.lua')
| -rw-r--r-- | xmake/plugins/show/lists/toolchains.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/plugins/show/lists/toolchains.lua b/xmake/plugins/show/lists/toolchains.lua index 911fd801c..621d09295 100644 --- a/xmake/plugins/show/lists/toolchains.lua +++ b/xmake/plugins/show/lists/toolchains.lua @@ -19,16 +19,16 @@ -- -- imports -import("core.base.option") -import("core.project.project") -import("core.platform.platform") -import(".showlist") +import("core.tool.toolchain") +import("core.base.text") -- show all toolchains function main() - local names = table.copy(platform.toolchains()) - for name, _ in pairs(project.toolchains()) do - table.insert(names, name) + + local tbl = {align = 'l', sep = " "} + for _, name in ipairs(toolchain.list()) do + local t = toolchain.load(name) + table.insert(tbl, {name, t:get("description")}) end - showlist(names) + print(text.table(tbl)) end |
