mirror of
https://github.com/Syping/ragephoto-cli.git
synced 2025-11-09 21:25:18 +01:00
impl. completion sources for get dataType
This commit is contained in:
parent
09bf4b4034
commit
84c371dede
1 changed files with 12 additions and 0 deletions
12
Program.cs
12
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<CompletionItem> dataTypes = [];
|
||||
dataTypes.AddRange([
|
||||
new("description"),
|
||||
new("format"),
|
||||
new("jpeg"),
|
||||
new("json"),
|
||||
new("sign"),
|
||||
new("title")]);
|
||||
return dataTypes;
|
||||
});
|
||||
Option<String> outputOption = new("--output", "-o") {
|
||||
Description = "Output File",
|
||||
DefaultValueFactory = _ => "-"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue