-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Mention that aliases are recursive #10935
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. |
Instead of duplicating portions of commands that are used identically across many aliases, the user can instead reuse any previously defined aliases.
@epage I changed the example a bit: [alias]
rr = "run --release"
recursive_example = "rr --example recursions" And modified the rr = "run --release"
space_example = ["run", "--release", "--", "\"command list\""] to that: rr = "run --release"
recursive_example = "rr --example recursions"
space_example = ["run", "--release", "--", "\"command list\""] I preferred adding it as new example so we don't lose the one with the array notation. I also decided not to do the recursion in the array example so people don't get confused when skimming it. Is that alright? |
@bors r+ |
☀️ Test successful - checks-actions |
Update cargo 7 commits in 4fd148c47e733770c537efac5220744945d572ef..ce40690a5e4e315d3dab0aae1eae69d0252c52ac 2022-08-03 15:03:52 +0000 to 2022-08-09 22:32:17 +0000 - Make the `rust-version` error recommend `cargo update --precise -p crate@ver` (rust-lang/cargo#10891) - resolver docs: link to version requirements syntax full explanation (rust-lang/cargo#10946) - Bump os_info to 3.5.0 (rust-lang/cargo#10943) - Mark --timings=html unstable in the document (rust-lang/cargo#10941) - Mention that aliases are recursive (rust-lang/cargo#10935) - Test if reserved filenames are allowed in Windows (rust-lang/cargo#10322) - improve error message for `no such subcommand` (rust-lang/cargo#10924)
Instead of duplicating portions of commands that are used identically across many aliases, the user can instead reuse any previously defined aliases.
What does this PR try to resolve?
Today I started working with
xtask
, which is a build system based on a simple cargo alias:Since the word "xtask" is rather difficult to type in my opinion (at least my left hand struggles quite a bit) I wanted to add another alias,
x
as a shorthand (similar to whatbuild
,run
, etc. have by default). Thereby I discovered that I needn't replicate the whole alias, because aliases are recursive. I consulted the docs and couldn't find a mention of this, hence I'm adding it as part of this PR so other users can discover it.How should we test and review this PR?
I don't think this requires a separate test, it's a minor change to the documentation only.
Additional information