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", Description = "Data Type",
DefaultValueFactory = _ => "jpeg" DefaultValueFactory = _ => "jpeg"
}; };
dataTypeArgument.CompletionSources.Add(_ => { dataTypeArgument.CompletionSources.Add(_ => [
List<CompletionItem> dataTypes = [];
dataTypes.AddRange([
new("description"), new("description"),
new("format"), new("format"),
new("jpeg"), new("jpeg"),
new("json"), new("json"),
new("sign"), new("sign"),
new("title")]); new("title")]);
return dataTypes;
});
Option<String> outputOption = new("--output", "-o") { Option<String> outputOption = new("--output", "-o") {
Description = "Output File", Description = "Output File",
DefaultValueFactory = _ => "-" DefaultValueFactory = _ => "-"