Skip to content

Commit 9dd37d7

Browse files
committed
Fix minor readme issues
1 parent 1932c75 commit 9dd37d7

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

Readme.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
</p>
2121

2222
**CliFx** is an opinionated framework for building command-line applications.
23-
It provides a model to express command interactions through a relationship of classes and properties, skipping all the low-level infrastructural concerns like argument parsing, routing, error handling, and help generation.
23+
It provides a model for expressing command interactions through classes and properties, skipping all the low-level infrastructure concerns like argument parsing, routing, error handling, and help generation.
2424

25-
**This is the readme for CliFx v3 (alpha). For v2, see [this readme](https://github.com/Tyrrrz/CliFx/blob/2.3.6/Readme.md)**.
25+
> [!NOTE]
26+
> This is the readme for CliFx v3 (alpha). For v2, see [this readme](https://github.com/Tyrrrz/CliFx/blob/2.3.6/Readme.md).
2627
2728
## Terms of use<sup>[[?]](https://github.com/Tyrrrz/.github/blob/prime/docs/why-so-political.md)</sup>
2829

@@ -42,7 +43,7 @@ To learn more about the war and how you can help, [click here](https://tyrrrz.me
4243
## Features
4344

4445
- Complete application framework, not just an argument parser
45-
- Minimum boilerplate and easy to get started
46+
- Minimal boilerplate and easy to get started
4647
- Class-first configuration via attributes
4748
- Comprehensive auto-generated help text
4849
- Support for deeply nested command hierarchies
@@ -97,12 +98,12 @@ public partial class LogCommand : ICommand
9798

9899
> [!IMPORTANT]
99100
> The command type must be declared as `partial` so that **CliFx** can extend it with necessary metadata and behavior.
100-
> If the type is nested within other types, all of them must be also marked as `partial`.
101+
> If the type is nested within other types, all of them must also be marked as `partial`.
101102
102103
In order to satisfy `ICommand`'s contract, the type needs to define an `ExecuteAsync(...)` method which contains the command's execution logic.
103104
As the only parameter, this method takes an instance of `IConsole` — a decoupled abstraction used in place of `System.Console` to write text, read binary data, or otherwise interact with the console.
104105

105-
Beyond that, your command will probably also need to be able to receive some input from the user.
106+
Beyond that, your command will probably also need to receive some input from the user.
106107
This is achieved by defining properties and attaching the `[CommandParameter]` and `[CommandOption]` attributes to bind them as either parameters or options.
107108

108109
The command in the above example serves as a simple logarithm calculator that has two inputs: a positional parameter for the logarithm value (bound to `Value`) and a named option for the logarithm base (bound to `Base`).
@@ -230,7 +231,7 @@ This allows the user to run the application in one of the two following ways:
230231
```console
231232
$ ./myapp log 100 -b 10
232233

233-
4
234+
2
234235

235236
$ ./myapp sum 1 2 3
236237

@@ -483,7 +484,7 @@ By default, the framework will try to automatically infer a suitable converter f
483484
- Converted by calling `.ctor(...)` with the array of converted values
484485
- Covers collection types like `List<T>`, `HashSet<T>`, etc.
485486

486-
For example, here is an example command that showcases some of these built-in conversions:
487+
For example, here is a command that showcases some of these built-in conversions:
487488

488489
```csharp
489490
[Command("search", Description = "Searches for files matching a pattern.")]
@@ -686,7 +687,7 @@ The parser's context-free nature has several implications on how it consumes arg
686687
For example, `./myapp -i file1.txt file2.txt` will always be parsed as an option with multiple values, regardless of the arity of the underlying property it's bound to.
687688
Similarly, unseparated arguments in the form of `./myapp -ofile` will be treated as five distinct options `'o'`, `'f'`, `'i'`, `'l'`, `'e'`, instead of `'o'` being set to value `"file"`.
688689

689-
These rules also make the order of arguments important — command-line string is expected to follow this pattern:
690+
These rules also make the order of arguments important — the command-line string is expected to follow this pattern:
690691

691692
```console
692693
$ ./myapp [command] [...parameters] [...options]
@@ -698,7 +699,7 @@ Because **CliFx** takes responsibility for the application's entire lifecycle, i
698699
To facilitate that, it uses an interface called `ITypeInstantiator` that determines how to create a new instance of a given type.
699700

700701
The default implementation of `ITypeInstantiator` only supports types that have public parameter-less constructors, which is sufficient for most common scenarios.
701-
However, in some cases you may want to define a custom initializer, for example when integrating with an external dependency container.
702+
However, in some cases you may want to define a custom instantiator, for example when integrating with an external dependency container.
702703

703704
To do that, pass a custom `ITypeInstantiator` or a factory delegate to the `UseTypeInstantiator(...)` method when building the application:
704705

@@ -819,7 +820,7 @@ You can run `myapp [command] --help` to show help for a specific command.
819820
To see the list of commands nested under a specific command, the user can refine their help request by specifying the corresponding command name before the help option:
820821

821822
```console
822-
$ myapp cmd1 --help
823+
$ ./myapp cmd1 --help
823824

824825
USAGE
825826
myapp cmd1 [options]

0 commit comments

Comments
 (0)