diff options
| author | ruki <[email protected]> | 2026-04-20 22:37:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-04-20 22:37:26 +0800 |
| commit | d782aae00f82bd160b0fc5c0cdac1ba27ae8ade1 (patch) | |
| tree | 17cfef203818daeb5ca86af19677440d4080cb3c /xmake/plugins/show/xmake.lua | |
| parent | 35d37f98381d8486f23b7761c90acdba3fc2e9d1 (diff) | |
add --format
Diffstat (limited to 'xmake/plugins/show/xmake.lua')
| -rw-r--r-- | xmake/plugins/show/xmake.lua | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xmake/plugins/show/xmake.lua b/xmake/plugins/show/xmake.lua index 6d040da92..ef3ea0fe2 100644 --- a/xmake/plugins/show/xmake.lua +++ b/xmake/plugins/show/xmake.lua @@ -30,16 +30,20 @@ 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, "dot", "k", false, "Output dependency graph in graphviz DOT format (only for --info=depgraph)."}, + {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 --json --pretty", - " - xmake show --info=depgraph --dot", - "values:", + " - xmake show --info=depgraph --format=json", + " - xmake show --info=depgraph --format=dot", values = function (complete, opt) return import("list").infos() end}, |
