-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): Improve the list command with options, and then some #599
Merged
shadows-withal
merged 2 commits into
rust-lang:main
from
AbdouSeck:improve-list-command
Jan 17, 2021
Merged
feat(cli): Improve the list command with options, and then some #599
shadows-withal
merged 2 commits into
rust-lang:main
from
AbdouSeck:improve-list-command
Jan 17, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jrvidal
reviewed
Dec 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, but this looks good @AbdouSeck 🚀
AbdouSeck
force-pushed
the
improve-list-command
branch
3 times, most recently
from
December 16, 2020 00:16
4165bd3
to
9d1676f
Compare
AbdouSeck
force-pushed
the
improve-list-command
branch
2 times, most recently
from
December 31, 2020 23:49
292b45c
to
e6dc81b
Compare
AbdouSeck
force-pushed
the
improve-list-command
branch
2 times, most recently
from
January 8, 2021 13:20
a229784
to
d1f25b0
Compare
shadows-withal
approved these changes
Jan 8, 2021
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 rust-lang#465, and will likely fix rust-lang#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.
AbdouSeck
force-pushed
the
improve-list-command
branch
from
January 8, 2021 18:21
d1f25b0
to
8bbe4ff
Compare
ppp3
pushed a commit
to ppp3/rustlings
that referenced
this pull request
May 23, 2022
feat(cli): Improve the list command with options, and then some
dmoore04
pushed a commit
to dmoore04/rustlings
that referenced
this pull request
Sep 11, 2022
feat(cli): Improve the list command with options, and then some
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR is two-fold:
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.Sample invocations:
This portion should also close #281.
Some shell utility use cases:
vim $(rustlings list --filter "conversion" --paths --unsolved)
rustlings run
:as_ref_mut
not ran #585, as well. The bug mentioned in those issues has to do with the way thewatch
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.
@fmoko @jrvidal if you've got some time, I'd love an eye on this. If there is anyone else with some experience on (or interest in) the CLI component, please feel free to let me know what you think.
Thanks,
Abdou