killercup / cargo-edit

A utility for managing cargo dependencies from the command line.
http://killercup.github.io/cargo-edit/
MIT License
3.09k stars 148 forks source link

suggestion: Using `--features` without an argument should list available features #840

Closed typecasto closed 1 year ago

typecasto commented 1 year ago

Currently, doing cargo add foo --features just prints error: a value is required for '--features <FEATURES>' but none was supplied. I think it would be useful behavior to instead list the features the target crate has. That would allow a more ergonomic workflow when adding a crate, where you can run cargo add foo -F, see a list of features, hit up in your shell, add the features you want, and hit enter. It would also be nice to seee which features are default, like the + vs - it prints when listing the features when you actually add a crate.

epage commented 1 year ago

cargo add is no longer maintained in this repo but in https://github.com/rust-lang/cargo. Please open an issue there.