From 84c371dede58df72ab8cb5a65cfbb45bd83b0045 Mon Sep 17 00:00:00 2001 From: Syping Date: Sat, 25 Oct 2025 02:43:26 +0200 Subject: [PATCH] impl. completion sources for get dataType --- Program.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Program.cs b/Program.cs index 523b162..cb90b2c 100644 --- a/Program.cs +++ b/Program.cs @@ -1,4 +1,5 @@ using System.CommandLine; +using System.CommandLine.Completions; using System.Text; namespace RagePhoto.Cli; @@ -149,6 +150,17 @@ internal static class Program { Description = "Data Type", DefaultValueFactory = _ => "jpeg" }; + dataTypeArgument.CompletionSources.Add(_ => { + List dataTypes = []; + dataTypes.AddRange([ + new("description"), + new("format"), + new("jpeg"), + new("json"), + new("sign"), + new("title")]); + return dataTypes; + }); Option outputOption = new("--output", "-o") { Description = "Output File", DefaultValueFactory = _ => "-"