Skip to content
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

Allow passing multiple crate names to cargo new #9823

Closed
jyn514 opened this issue Aug 22, 2021 · 2 comments
Closed

Allow passing multiple crate names to cargo new #9823

jyn514 opened this issue Aug 22, 2021 · 2 comments
Assignees
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 22, 2021

Describe the problem you are trying to solve
cargo new a b c gives an error:

error: Found argument 'b' which wasn't expected, or isn't valid in this context

USAGE:
    cargo new <path> --lib

Describe the solution you'd like
Allow passing multiple crates at the same time. Right now I do this with xargs, which works but is annoying to remember.

$ echo inner middle outer | xargs -n1 cargo new --lib
     Created library `inner` package
     Created library `middle` package
     Created library `outer` package

Notes

$ cargo --version
cargo 1.56.0-nightly (e96bdb0c3 2021-08-17)
@jyn514 jyn514 added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Aug 22, 2021
@ghost ghost mentioned this issue Aug 22, 2021
@heisen-li
Copy link
Contributor

Seems like an interesting feature. Can I do it?

@heisen-li
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants