summaryrefslogtreecommitdiff
path: root/xmake/plugins/show/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/plugins/show/xmake.lua')
-rw-r--r--xmake/plugins/show/xmake.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/xmake/plugins/show/xmake.lua b/xmake/plugins/show/xmake.lua
index 331aeb468..ef3ea0fe2 100644
--- a/xmake/plugins/show/xmake.lua
+++ b/xmake/plugins/show/xmake.lua
@@ -30,8 +30,23 @@ task("show")
return import("list").lists()
end},
{'g', "group", "kv", nil, "Filter targets by the given group name."},
- {nil, "json", "k", false, "Show information with json format."},
- {nil, "pretty", "k", false, "Enable pretty formatted json output."},
+ {nil, "json", "k", false, "Show information with json format (deprecated, use --format=json)."},
+ {nil, "pretty", "k", false, "Enable pretty formatted output."},
+ {nil, "format", "kv", nil, "Set the output format.",
+ "e.g.",
+ " - xmake show --format=json",
+ " - xmake show --info=depgraph --format=dot",
+ "values: json (for all), dot (for --info=depgraph only)",
+ values = {"plain", "json", "dot"}},
+ {'i', "info", "kv", nil, "Show the given information.",
+ "e.g.",
+ " - xmake show --info=depgraph",
+ " - xmake show --info=depgraph --target=app",
+ " - xmake show --info=depgraph --format=json",
+ " - xmake show --info=depgraph --format=dot",
+ values = function (complete, opt)
+ return import("list").infos()
+ end},
{'t', "target", "kv", nil, "Show the information of the given target.",
values = function (complete, opt)
return import("private.utils.complete_helper.targets")(complete, opt)
@@ -40,4 +55,3 @@ task("show")
}
-