-
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
Custom subcommand awareness #2187
Comments
How about looking for |
Yeah that's certainly a possibility, right now |
I would suggest that every subcommand should use a certain keyword on crates.io. You could then filter for that keyword and see the most used subcommands. |
If we're looking for Marking a particular crates.io keyword as the signifier seriously limits the possibility of a mistake occurring (although someone could incorrectly assign the keyword to their project when it's not actually a cargo sub command project, so maybe some warning from crates.io may be warranted), but it also means that any cargo sub command that wants to be surfaced automatically by cargo has to be registered on crates.io, which some may find onerous. |
I believe git takes a similar approach for poking for subcommands, but that's true that if I also think the keyword suggestion was simply for discovery, not that Cargo would check against crates.io to ensure that it's there or have it as a restriction. You'd just go brows everything with the cargo subcommand tag and in theory have a good idea about what all the subcommands are. |
|
How quickly can we work out what subcommands exist? E.g. could running This would preferably just use an existing registry, rather than update it, since that can be quite slow. But I guess we'd probably want to hit the network to determine sort order anyway. |
@huonw I think basically as fast as It's slow enough that I wouldn't want it to run on |
Ah and as an example of speed, just run:
|
There is also http://libs.rs/cargo-subcommands/ (I maintain the site). |
|
There is also cargo-extras which is a meta package for installing all the popular commands at once. IMO there just needs to be a better way discover, search for, and install subcommands. |
Like cargo-extras, a semiofficial cargo-nursery org or rust-lang-nursery/cargo-subcommands repo could convey social proof and make discovery a bit easier. |
+1 can have a section on the guide as well also, a guide on how to write a cargo subcommand is missing |
I would one like to see the official partitioned from the add ons. like so
Then if possible, I'd love to see if its possible to provide the help text. Now I know the default help text comes from
The goal is to remind my old brain why I installed this add on. |
There are a lot of different ideas in this issue; please open new issues for them if you're still interested. As far as the main issue, I think this has been addressed by categories on crates.io which have descriptions and are a bit easier to discover than keywords. Here's the category for cargo plugins: https://crates.io/categories/development-tools::cargo-plugins |
@drusellers Do we have a new issue about your proposal? I still get the same output with |
@MondoGao I have not. Please feel free to. |
Now that we've got
cargo install
it's quite easy to make new subcommands left and right. There's lots in the ecosystem already, but they're not necessarily always easy to discover! Similar to #1251, it'd be good if we had a better story for discovering custom subcommands in the wild via some means. Some questions that would be nice to answer are:Some similar ideas to #1251 may lend themselves to here as well.
The text was updated successfully, but these errors were encountered: