-
Notifications
You must be signed in to change notification settings - Fork 2.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
missing cargo command suggestions #4682
Comments
Two UX thoughts:
|
For the latter, I'd suggest that we have metadata that a crate can provide to indicate that it ships a specific cargo command, and cargo should show all crates that provide the specified command, ideally in an order comparable to the crates.io search results. |
In #11226, it was brought up that we have access to "the full list of crates" but @weihanglo pointed out
And I followed up with
|
I think there can be value in doing this without it being perfect. To one extreme, I brought up in #11226
and @weihanglo brought up
which can apply more generally to this issue.
|
FWIW, if there are technical reasons that the full registry isn't available (which might be a problem in the future), I think it would be useful to have even a small list of popular installeable plugins. In my case in particular, it was noticing that |
To be clear, this is more for the use case of ad-hoc plugins like For the former, a simple blind suggestion of |
fix(cli): Suggest cargo-search on bad commands This is a low-tech solution alternative to the options proposed in #4682 - Search `[[bin]]`s within all packages in the registry (which aren't tracked atm), suggesting to `cargo install` what is found - Check if `cargo-<cmd>` is in the registry, suggesting `cargo install if it is By suggesting `cargo search`, we are giving them a tool so they can verify if the package is what they want (a `cargo info` would help as a next step). Is is needed? - New users might not know of `cargo search` but they can search on crates.io - New users might not be aware of the `cargo-<cmd>` naming pattern Seems like this can still offer some benefit. Fixes #4682
Inspired by the various cargo subcommands available in the broader crates.io ecosystem: we should consider adding a mechanism to automatically search for Cargo subcommands if someone enters an unknown subcommand. For instance,
cargo tree
could suggest installing cargo-tree. This could make use of metadata provided by crates.io.cc @carols10cents
The text was updated successfully, but these errors were encountered: