-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(cli): add colors to -Zhelp
console output
#13269
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3d4407d
test(cli): snapshot test for `-Z help`
weihanglo 0d480df
refactor(cli): use format alignment
weihanglo f50b774
feat(cli): add colors to `-Zhelp` console output
weihanglo 8fee74d
refactor(cli): tweak to align existing style
weihanglo 59cfee1
refactor(cli): remove allocation and use format arg capture
weihanglo dbfe427
test: loop over aliases to asser -Zhelp output
weihanglo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
mod help; | ||
mod z_help; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use cargo_test_support::curr_dir; | ||
use cargo_test_support::prelude::*; | ||
|
||
#[cargo_test] | ||
fn case() { | ||
snapbox::cmd::Command::cargo_ui() | ||
.masquerade_as_nightly_cargo(&["-Z help"]) | ||
.args(["-Z", "help"]) | ||
.assert() | ||
.success() | ||
.stdout_matches_path(curr_dir!().join("stdout.log")) | ||
.stderr_matches_path(curr_dir!().join("stderr.log")); | ||
} |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Available unstable (nightly-only) flags: | ||
|
||
-Z allow-features Allow *only* the listed unstable features | ||
-Z asymmetric-token Allows authenticating with asymmetric tokens | ||
-Z avoid-dev-deps Avoid installing dev-dependencies if possible | ||
-Z binary-dep-depinfo Track changes to dependency artifacts | ||
-Z bindeps Allow Cargo packages to depend on bin, cdylib, and staticlib crates, and use the artifacts built by those crates | ||
-Z build-std Enable Cargo to compile the standard library itself as part of a crate graph compilation | ||
-Z build-std-features Configure features enabled for the standard library itself when building the standard library | ||
-Z check-cfg Enable compile-time checking of `cfg` names/values/features | ||
-Z codegen-backend Enable the `codegen-backend` option in profiles in .cargo/config.toml file | ||
-Z config-include Enable the `include` key in config files | ||
-Z direct-minimal-versions Resolve minimal dependency versions instead of maximum (direct dependencies only) | ||
-Z doctest-xcompile Compile and run doctests for non-host target using runner config | ||
-Z dual-proc-macros Build proc-macros for both the host and the target | ||
-Z gc Track cache usage and "garbage collect" unused files | ||
-Z gitoxide Use gitoxide for the given git interactions, or all of them if no argument is given | ||
-Z host-config Enable the [host] section in the .cargo/config.toml file | ||
-Z lints Pass `[lints]` to the linting tools | ||
-Z minimal-versions Resolve minimal dependency versions instead of maximum | ||
-Z msrv-policy Enable rust-version aware policy within cargo | ||
-Z mtime-on-use Configure Cargo to update the mtime of used files | ||
-Z no-index-update Do not update the registry index even if the cache is outdated | ||
-Z panic-abort-tests Enable support to run tests with -Cpanic=abort | ||
-Z profile-rustflags Enable the `rustflags` option in profiles in .cargo/config.toml file | ||
-Z publish-timeout Enable the `publish.timeout` key in .cargo/config.toml file | ||
-Z rustdoc-map Allow passing external documentation mappings to rustdoc | ||
-Z rustdoc-scrape-examples Allows Rustdoc to scrape code examples from reverse-dependencies | ||
-Z script Enable support for single-file, `.rs` packages | ||
-Z target-applies-to-host Enable the `target-applies-to-host` key in the .cargo/config.toml file | ||
-Z trim-paths Enable the `trim-paths` option in profiles | ||
-Z unstable-options Allow the usage of unstable options | ||
|
||
Run with `cargo -Z [FLAG] [COMMAND]` | ||
|
||
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html for more information about these flags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.