diff options
| author | ruki <[email protected]> | 2023-09-21 23:02:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-21 23:02:48 +0800 |
| commit | 8c054a185f4471cbd25086d0be994d1e1ce9c625 (patch) | |
| tree | a3f6bfe3c0bcf88fe32986a03031eae0e318ab19 | |
| parent | 51a80ef7d4b8fd1b2aafdde3a697b327c71fba41 (diff) | |
sort policies for xmake show
| -rw-r--r-- | xmake/plugins/show/lists/policies.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/plugins/show/lists/policies.lua b/xmake/plugins/show/lists/policies.lua index f341ad9b2..67ca7f158 100644 --- a/xmake/plugins/show/lists/policies.lua +++ b/xmake/plugins/show/lists/policies.lua @@ -23,10 +23,9 @@ import("core.project.policy") -- show all policies function main() - local policies = policy.policies() local width = 45 - - for name, policy in pairs(policies) do + local policies = policy.policies() + for name, policy in table.orderpairs(policies) do cprint("${color.dump.string}%s${clear}%s%s", name, (" "):rep(width - #name), policy["description"]) cprint("%s${bright}%s", (" "):rep(width), policy["default"] or "false") end |
