summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2023-08-15 01:12:14 +0200
committerGitHub <[email protected]>2023-08-15 01:12:14 +0200
commit52e9844649f68d700db373d20e27ba635869aacd (patch)
tree170a661bb71dbdc1efec1919aca20d6a118ad839
parent7d1358fbf7e14dc04512009ba5f41216d7392980 (diff)
Order target names in help menu
-rw-r--r--xmake/modules/private/utils/complete_helper.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/private/utils/complete_helper.lua b/xmake/modules/private/utils/complete_helper.lua
index 2816de056..ca187467c 100644
--- a/xmake/modules/private/utils/complete_helper.lua
+++ b/xmake/modules/private/utils/complete_helper.lua
@@ -28,7 +28,7 @@ function targets()
{
function ()
config.load()
- return table.keys(project.targets())
+ return table.orderkeys(project.targets())
end
}
end
@@ -41,7 +41,7 @@ function runable_targets(complete, opt)
config.load()
local targets = project.targets()
local runable = {}
- for k, v in pairs(targets) do
+ for k, v in table.orderpairs(targets) do
if (v:script("run") or v:is_binary()) and (not complete or k:startswith(complete)) then
table.insert(runable, k)
end