simplify dataType completion code

This commit is contained in:
Syping 2025-10-25 02:48:54 +02:00
parent 84c371dede
commit 71907a2ddc

View file

@ -150,17 +150,13 @@ internal static class Program {
Description = "Data Type",
DefaultValueFactory = _ => "jpeg"
};
dataTypeArgument.CompletionSources.Add(_ => {
List<CompletionItem> dataTypes = [];
dataTypes.AddRange([
new("description"),
new("format"),
new("jpeg"),
new("json"),
new("sign"),
new("title")]);
return dataTypes;
});
dataTypeArgument.CompletionSources.Add(_ => [
new("description"),
new("format"),
new("jpeg"),
new("json"),
new("sign"),
new("title")]);
Option<String> outputOption = new("--output", "-o") {
Description = "Output File",
DefaultValueFactory = _ => "-"