Skip to content

Commit d2c46ba

Browse files
committed
Fix past particples of command verbs. e.g. removd => removed
1 parent 3f16c7d commit d2c46ba

File tree

9 files changed

+274
-18
lines changed

9 files changed

+274
-18
lines changed

README.md

Lines changed: 262 additions & 9 deletions
Large diffs are not rendered by default.

src/SeqCli/Cli/Commands/Dashboard/ListCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public ListCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
3737
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
3838

3939
_entityIdentity = Enable(new EntityIdentityFeature("dashboard", "list"));
40-
_entityOwner = Enable(new EntityOwnerFeature("dashboard", "list", _entityIdentity));
40+
_entityOwner = Enable(new EntityOwnerFeature("dashboard", "list", "listed", _entityIdentity));
4141
_output = Enable(new OutputFormatFeature(config.Output));
4242
_connection = Enable<ConnectionFeature>();
4343
}

src/SeqCli/Cli/Commands/Dashboard/RemoveCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public RemoveCommand(SeqConnectionFactory connectionFactory)
3636
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
3737

3838
_entityIdentity = Enable(new EntityIdentityFeature("dashboard", "remove"));
39-
_entityOwner = Enable(new EntityOwnerFeature("dashboard", "remove", _entityIdentity));
39+
_entityOwner = Enable(new EntityOwnerFeature("dashboard", "remove", "removed", _entityIdentity));
4040
_connection = Enable<ConnectionFeature>();
4141
}
4242

src/SeqCli/Cli/Commands/Signal/ImportCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public ImportCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config
5151
_ => _merge = true);
5252

5353
_fileInputFeature = Enable(new FileInputFeature("File to import"));
54-
_entityOwner = Enable(new EntityOwnerFeature("signal", "import"));
54+
_entityOwner = Enable(new EntityOwnerFeature("signal", "import", "imported"));
5555
_connection = Enable<ConnectionFeature>();
5656
}
5757

src/SeqCli/Cli/Commands/Signal/ListCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public ListCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
3737
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
3838

3939
_entityIdentity = Enable(new EntityIdentityFeature("signal", "list"));
40-
_entityOwner = Enable(new EntityOwnerFeature("signal", "list", _entityIdentity));
40+
_entityOwner = Enable(new EntityOwnerFeature("signal", "list", "listed", _entityIdentity));
4141
_output = Enable(new OutputFormatFeature(config.Output));
4242
_connection = Enable<ConnectionFeature>();
4343
}

src/SeqCli/Cli/Commands/Signal/RemoveCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public RemoveCommand(SeqConnectionFactory connectionFactory)
3636
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
3737

3838
_entityIdentity = Enable(new EntityIdentityFeature("signal", "remove"));
39-
_entityOwner = Enable(new EntityOwnerFeature("signal", "remove", _entityIdentity));
39+
_entityOwner = Enable(new EntityOwnerFeature("signal", "remove", "removed", _entityIdentity));
4040
_connection = Enable<ConnectionFeature>();
4141
}
4242

src/SeqCli/Cli/Commands/Workspace/ListCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public ListCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
2323
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
2424

2525
_entityIdentity = Enable(new EntityIdentityFeature("workspace", "list"));
26-
_entityOwner = Enable(new EntityOwnerFeature("workspace", "list", _entityIdentity));
26+
_entityOwner = Enable(new EntityOwnerFeature("workspace", "list", "listed", _entityIdentity));
2727
_output = Enable(new OutputFormatFeature(config.Output));
2828
_connection = Enable<ConnectionFeature>();
2929
}

src/SeqCli/Cli/Commands/Workspace/RemoveCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public RemoveCommand(SeqConnectionFactory connectionFactory)
2222
_connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory));
2323

2424
_entityIdentity = Enable(new EntityIdentityFeature("workspace", "remove"));
25-
_entityOwner = Enable(new EntityOwnerFeature("workspace", "remove", _entityIdentity));
25+
_entityOwner = Enable(new EntityOwnerFeature("workspace", "remove", "removed", _entityIdentity));
2626
_connection = Enable<ConnectionFeature>();
2727
}
2828

src/SeqCli/Cli/Features/EntityOwnerFeature.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ class EntityOwnerFeature : CommandFeature
2121
{
2222
readonly string _entityName;
2323
readonly string _verb;
24+
private readonly string _verbPastParticiple;
2425
readonly EntityIdentityFeature? _identityFeature;
2526

26-
public EntityOwnerFeature(string entityName, string verb, EntityIdentityFeature? identityFeature = null)
27+
public EntityOwnerFeature(string entityName, string verb, string verbPastParticiple, EntityIdentityFeature? identityFeature = null)
2728
{
2829
_entityName = entityName ?? throw new ArgumentNullException(nameof(entityName));
2930
_verb = verb ?? throw new ArgumentNullException(nameof(verb));
31+
_verbPastParticiple = verbPastParticiple ?? throw new ArgumentNullException(nameof(verbPastParticiple));
3032
_identityFeature = identityFeature;
3133
}
3234

3335
public override void Enable(OptionSet options)
3436
{
3537
options.Add(
3638
"o=|owner=",
37-
$"The id of the user to {_verb} {_entityName}s for; by default, shared {_entityName}s are {_verb.TrimEnd('e')}d",
39+
$"The id of the user to {_verb} {_entityName}s for; by default, shared {_entityName}s are {_verbPastParticiple}",
3840
o =>
3941
{
4042
OwnerId = StringNormalizationExtensions.Normalize(o);
@@ -55,4 +57,5 @@ public override IEnumerable<string> GetUsageErrors()
5557
public string? OwnerId { get; private set; }
5658

5759
public bool IncludeShared { get; private set; } = true;
60+
5861
}

0 commit comments

Comments
 (0)