mirror of
https://github.com/m-lamonaca/script-launcher.git
synced 2025-04-19 14:36:27 +00:00
Rename CLI args
This commit is contained in:
parent
dfd999dff4
commit
150685acee
1 changed files with 6 additions and 6 deletions
|
@ -9,11 +9,11 @@ app.AddCommand(RootCommand);
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|
||||||
static async Task RootCommand(
|
static async Task RootCommand(
|
||||||
[Option("extensions", new[] { 'e' }, Description = "Comma separated list of script extensions to search")] string? extensions,
|
[Option("extensions", new[] { 'x' }, Description = "Comma separated list of script extensions")] string? extensions,
|
||||||
[Option("depth", new[] { 'd' }, Description = "Folder depth of the search")] int depth = 1,
|
[Option("depth", new[] { 'd' }, Description = "Search depth")] int depth = 1,
|
||||||
[Option("elevated", new[] { 'E' }, Description = "Run the script with elevated privileges")] bool elevated = false,
|
[Option("elevated", new[] { 'e' }, Description = "Run with elevated privileges")] bool elevated = false,
|
||||||
[Option("grouped", new[] { 'g' }, Description = "Group selection bay containing folder")] bool grouped = false,
|
[Option("group", new[] { 'g' }, Description = "Group scripts by folder")] bool group = false,
|
||||||
[Argument(Name = "Directory", Description = "Directory from which search the scripts")] string directory = ".")
|
[Argument(Name = "Directory", Description = "Starting directory")] string directory = ".")
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(directory))
|
if (!Directory.Exists(directory))
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ static async Task RootCommand(
|
||||||
FileInfo[] files;
|
FileInfo[] files;
|
||||||
var finder = new ScriptFinder(extensions, directory, depth);
|
var finder = new ScriptFinder(extensions, directory, depth);
|
||||||
|
|
||||||
if (grouped)
|
if (group)
|
||||||
{
|
{
|
||||||
var dict = finder.GetScriptsByDirectory();
|
var dict = finder.GetScriptsByDirectory();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue