Skip to content

Commit 5ba0f2a

Browse files
authored
Merge pull request #379 from liammclennan/fix-doc-verbs
Fix past participles of command verbs. e.g. removd => removed
2 parents d1c5b74 + d2c46ba commit 5ba0f2a

File tree

9 files changed

+55
-16
lines changed

9 files changed

+55
-16
lines changed

README.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ seqcli dashboard list
513513
| ------ | ----------- |
514514
| `-t`, `--title=VALUE` | The title of the dashboard(s) to list |
515515
| `-i`, `--id=VALUE` | The id of a single dashboard to list |
516-
| `-o`, `--owner=VALUE` | The id of the user to list dashboards for; by default, shared dashboards are listd |
516+
| `-o`, `--owner=VALUE` | The id of the user to list dashboards for; by default, shared dashboards are listed |
517517
| `--json` | Print output in newline-delimited JSON (the default is plain text) |
518518
| `--no-color` | Don't colorize text output |
519519
| `--force-color` | Force redirected output to have ANSI color (unless `--no-color` is also specified) |
@@ -535,7 +535,7 @@ seqcli dashboard remove -i dashboard-159
535535
| ------ | ----------- |
536536
| `-t`, `--title=VALUE` | The title of the dashboard(s) to remove |
537537
| `-i`, `--id=VALUE` | The id of a single dashboard to remove |
538-
| `-o`, `--owner=VALUE` | The id of the user to remove dashboards for; by default, shared dashboards are removd |
538+
| `-o`, `--owner=VALUE` | The id of the user to remove dashboards for; by default, shared dashboards are removed |
539539
| `-s`, `--server=VALUE` | The URL of the Seq server; by default the `connection.serverUrl` config value will be used |
540540
| `-a`, `--apikey=VALUE` | The API key to use when connecting to the server; by default the `connection.apiKey` config value will be used |
541541
| `--profile=VALUE` | A connection profile to use; by default the `connection.serverUrl` and `connection.apiKey` config values will be used |
@@ -1176,7 +1176,7 @@ seqcli signal import -i ./Exceptions.json
11761176
| ------ | ----------- |
11771177
| `--merge` | Update signals that have ids matching those in the imported data; the default is to always create new signals |
11781178
| `-i`, `--input=VALUE` | File to import; if not specified, `STDIN` will be used |
1179-
| `-o`, `--owner=VALUE` | The id of the user to import signals for; by default, shared signals are importd |
1179+
| `-o`, `--owner=VALUE` | The id of the user to import signals for; by default, shared signals are imported |
11801180
| `-s`, `--server=VALUE` | The URL of the Seq server; by default the `connection.serverUrl` config value will be used |
11811181
| `-a`, `--apikey=VALUE` | The API key to use when connecting to the server; by default the `connection.apiKey` config value will be used |
11821182
| `--profile=VALUE` | A connection profile to use; by default the `connection.serverUrl` and `connection.apiKey` config values will be used |
@@ -1195,7 +1195,7 @@ seqcli signal list
11951195
| ------ | ----------- |
11961196
| `-t`, `--title=VALUE` | The title of the signal(s) to list |
11971197
| `-i`, `--id=VALUE` | The id of a single signal to list |
1198-
| `-o`, `--owner=VALUE` | The id of the user to list signals for; by default, shared signals are listd |
1198+
| `-o`, `--owner=VALUE` | The id of the user to list signals for; by default, shared signals are listed |
11991199
| `--json` | Print output in newline-delimited JSON (the default is plain text) |
12001200
| `--no-color` | Don't colorize text output |
12011201
| `--force-color` | Force redirected output to have ANSI color (unless `--no-color` is also specified) |
@@ -1217,7 +1217,25 @@ seqcli signal remove -t 'Test Signal'
12171217
| ------ | ----------- |
12181218
| `-t`, `--title=VALUE` | The title of the signal(s) to remove |
12191219
| `-i`, `--id=VALUE` | The id of a single signal to remove |
1220-
| `-o`, `--owner=VALUE` | The id of the user to remove signals for; by default, shared signals are removd |
1220+
| `-o`, `--owner=VALUE` | The id of the user to remove signals for; by default, shared signals are removed |
1221+
| `-s`, `--server=VALUE` | The URL of the Seq server; by default the `connection.serverUrl` config value will be used |
1222+
| `-a`, `--apikey=VALUE` | The API key to use when connecting to the server; by default the `connection.apiKey` config value will be used |
1223+
| `--profile=VALUE` | A connection profile to use; by default the `connection.serverUrl` and `connection.apiKey` config values will be used |
1224+
1225+
### `signal update`
1226+
1227+
Update an existing signal.
1228+
1229+
Example:
1230+
1231+
```
1232+
seqcli signal update --json '{...}'
1233+
```
1234+
1235+
| Option | Description |
1236+
| ------ | ----------- |
1237+
| `--json=VALUE` | The updated signal in JSON format; this can be produced using `seqcli signal list --json` |
1238+
| `--json-stdin` | Read the updated signal as JSON from `STDIN` |
12211239
| `-s`, `--server=VALUE` | The URL of the Seq server; by default the `connection.serverUrl` config value will be used |
12221240
| `-a`, `--apikey=VALUE` | The API key to use when connecting to the server; by default the `connection.apiKey` config value will be used |
12231241
| `--profile=VALUE` | A connection profile to use; by default the `connection.serverUrl` and `connection.apiKey` config values will be used |
@@ -1418,7 +1436,7 @@ seqcli workspace list
14181436
| ------ | ----------- |
14191437
| `-t`, `--title=VALUE` | The title of the workspace(s) to list |
14201438
| `-i`, `--id=VALUE` | The id of a single workspace to list |
1421-
| `-o`, `--owner=VALUE` | The id of the user to list workspaces for; by default, shared workspaces are listd |
1439+
| `-o`, `--owner=VALUE` | The id of the user to list workspaces for; by default, shared workspaces are listed |
14221440
| `--json` | Print output in newline-delimited JSON (the default is plain text) |
14231441
| `--no-color` | Don't colorize text output |
14241442
| `--force-color` | Force redirected output to have ANSI color (unless `--no-color` is also specified) |
@@ -1440,7 +1458,25 @@ seqcli workspace remove -t 'My Workspace'
14401458
| ------ | ----------- |
14411459
| `-t`, `--title=VALUE` | The title of the workspace(s) to remove |
14421460
| `-i`, `--id=VALUE` | The id of a single workspace to remove |
1443-
| `-o`, `--owner=VALUE` | The id of the user to remove workspaces for; by default, shared workspaces are removd |
1461+
| `-o`, `--owner=VALUE` | The id of the user to remove workspaces for; by default, shared workspaces are removed |
1462+
| `-s`, `--server=VALUE` | The URL of the Seq server; by default the `connection.serverUrl` config value will be used |
1463+
| `-a`, `--apikey=VALUE` | The API key to use when connecting to the server; by default the `connection.apiKey` config value will be used |
1464+
| `--profile=VALUE` | A connection profile to use; by default the `connection.serverUrl` and `connection.apiKey` config values will be used |
1465+
1466+
### `workspace update`
1467+
1468+
Update an existing workspace.
1469+
1470+
Example:
1471+
1472+
```
1473+
seqcli workspace update --json '{...}'
1474+
```
1475+
1476+
| Option | Description |
1477+
| ------ | ----------- |
1478+
| `--json=VALUE` | The updated workspace in JSON format; this can be produced using `seqcli workspace list --json` |
1479+
| `--json-stdin` | Read the updated workspace as JSON from `STDIN` |
14441480
| `-s`, `--server=VALUE` | The URL of the Seq server; by default the `connection.serverUrl` config value will be used |
14451481
| `-a`, `--apikey=VALUE` | The API key to use when connecting to the server; by default the `connection.apiKey` config value will be used |
14461482
| `--profile=VALUE` | A connection profile to use; by default the `connection.serverUrl` and `connection.apiKey` config values will be used |

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)