Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant explain settings ctor #1534

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/Spectre.Console.Cli/Internal/Commands/ExplainCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,16 @@ public ExplainCommand(IConfiguration configuration, CommandModel commandModel)

public sealed class Settings : CommandSettings
{
public Settings(string[]? commands, bool? detailed, bool includeHidden)
{
Commands = commands;
Detailed = detailed;
IncludeHidden = includeHidden;
}

[CommandArgument(0, "[command]")]
public string[]? Commands { get; }
public string[]? Commands { get; set; }

[Description("Include detailed information about the commands.")]
[CommandOption("-d|--detailed")]
public bool? Detailed { get; }
public bool? Detailed { get; set; }

[Description("Include hidden commands and options.")]
[CommandOption("--hidden")]
public bool IncludeHidden { get; }
public bool IncludeHidden { get; set; }
}

public override int Execute(CommandContext context, Settings settings)
Expand Down