Skip to content

Commit 6424e1e

Browse files
committed
Update README
1 parent 3f24eb5 commit 6424e1e

1 file changed

Lines changed: 29 additions & 10 deletions

File tree

README.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@ $ paru -S cargo-selector
2222

2323
## Usage
2424

25+
### Basic
26+
27+
Run the command in the cargo project directory:
28+
29+
```
30+
$ cargo selector
31+
```
32+
33+
Then, target list will be displayed, and you can execute the following command by selecting it.
34+
35+
```sh
36+
# if the target is bin
37+
$ cargo run --bin xyz [--features "foo bar"]
38+
39+
# if the target is example
40+
$ cargo run --example xyz [--features "foo bar"]
41+
```
42+
43+
By switching the action, you can also run only the build.
44+
45+
### Options
46+
2547
```
2648
Usage: cargo selector [OPTIONS]
2749
@@ -30,28 +52,25 @@ Options:
3052
-n, --inline-list-size <SIZE> List size [default: 10]
3153
-k, --kind <NAME> Target kind [possible values: bin, example]
3254
-t, --match-type <TYPE> Match type [possible values: substring, fuzzy]
55+
-a, --additional-args <ARGS> Additional arguments
3356
-h, --help Print help
3457
-V, --version Print version
3558
```
3659

37-
Run the command in the cargo project directory:
60+
#### -a, --additional-args
61+
62+
If you run the command:
3863

3964
```
40-
$ cargo selector
65+
$ cargo selector -a "-- --foo 1"
4166
```
4267

43-
Then, target list will be displayed, and you can execute the following command by selecting it.
68+
Then select the command and it will run:
4469

4570
```sh
46-
# if the target is bin
47-
$ cargo run --bin xyz [--features "foo bar"]
48-
49-
# if the target is example
50-
$ cargo run --example xyz [--features "foo bar"]
71+
$ cargo run --bin xyz -- --foo 1
5172
```
5273

53-
By switching the action, you can also run only the build.
54-
5574
### Keybindings
5675

5776
| Key | Description |

0 commit comments

Comments
 (0)