diff options
| author | Abdou Seck <djily02016@gmail.com> | 2020-12-12 13:48:25 -0500 |
|---|---|---|
| committer | Abdou Seck <djily02016@gmail.com> | 2021-01-08 13:21:00 -0500 |
| commit | 8bbe4ff1385c5c169c90cd3ff9253f9a91daaf8e (patch) | |
| tree | 2041ef8a6c7beea2a2f156c564a1e0b65620171e /tests/fixture/state | |
| parent | 0b9220c1fc5ae32438f64bf2f5bf5f47d33e3f3f (diff) | |
feat(cli): Improve the list command with options, and then some
1.
`rustlings list` should now display more than just the exercise names.
Information such as file paths and exercises statuses should be displayed.
The `--paths` option limits the displayed fields to only the path names; while the `--names`
option limits the displayed fields to only exercise names.
You can also control which exercises are displayed, by using the `--filter` option, or
the `--solved` or `--unsolved` flags.
Some use cases:
- Fetching pending exercise files with the keyword "conversion" to pass to my editor:
```sh
vim $(rustlings list --filter "conversion" --paths --unsolved)
```
- Fetching exercise names with keyword "conversion" to pass to `rustlings run`:
```sh
for exercise in $(rustlings list --filter "conversion" --names)
do
rustlings run ${exercise}
done
```
2.
This should also fix #465, and will likely fix #585, as well.
That bug mentioned in those issues has to do with the way the `watch` command handler fetches the pending exercises.
Going forward, the least recently updated exercises along with all the other exercises in a pending state are fetched.
Diffstat (limited to 'tests/fixture/state')
| -rw-r--r-- | tests/fixture/state/info.toml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/fixture/state/info.toml b/tests/fixture/state/info.toml index 7bfc697..547b3a4 100644 --- a/tests/fixture/state/info.toml +++ b/tests/fixture/state/info.toml @@ -9,3 +9,10 @@ name = "pending_test_exercise" path = "pending_test_exercise.rs" mode = "test" hint = """""" + +[[exercises]] +name = "finished_exercise" +path = "finished_exercise.rs" +mode = "compile" +hint = """""" + |
