Skip to content

Commit 269280f

Browse files
committed
fix(cli): Adjust terminal styles to match rustc
Fixes #12740
1 parent 5b6c4c3 commit 269280f

File tree

391 files changed

+2721
-2744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+2721
-2744
lines changed

src/bin/cargo/cli.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn print_list(gctx: &GlobalContext, is_verbose: bool) {
163163
]);
164164
drop_println!(
165165
gctx,
166-
color_print::cstr!("<green,bold>Installed Commands:</>")
166+
color_print::cstr!("<bright-green,bold>Installed Commands:</>")
167167
);
168168
for (name, command) in list_commands(gctx) {
169169
let known_external_desc = known_external_command_descriptions.get(name.as_str());
@@ -557,11 +557,11 @@ pub fn cli(gctx: &GlobalContext) -> Command {
557557

558558
let usage = if is_rustup() {
559559
color_print::cstr!(
560-
"<cyan,bold>cargo</> <cyan>[+toolchain] [OPTIONS] [COMMAND]</>\n <cyan,bold>cargo</> <cyan>[+toolchain] [OPTIONS]</> <cyan,bold>-Zscript</> <cyan><<MANIFEST_RS>> [ARGS]...</>"
560+
"<bright-cyan,bold>cargo</> <bright-cyan>[+toolchain] [OPTIONS] [COMMAND]</>\n <bright-cyan,bold>cargo</> <bright-cyan>[+toolchain] [OPTIONS]</> <bright-cyan,bold>-Zscript</> <bright-cyan><<MANIFEST_RS>> [ARGS]...</>"
561561
)
562562
} else {
563563
color_print::cstr!(
564-
"<cyan,bold>cargo</> <cyan>[OPTIONS] [COMMAND]</>\n <cyan,bold>cargo</> <cyan>[OPTIONS]</> <cyan,bold>-Zscript</> <cyan><<MANIFEST_RS>> [ARGS]...</>"
564+
"<bright-cyan,bold>cargo</> <bright-cyan>[OPTIONS] [COMMAND]</>\n <bright-cyan,bold>cargo</> <bright-cyan>[OPTIONS]</> <bright-cyan,bold>-Zscript</> <bright-cyan><<MANIFEST_RS>> [ARGS]...</>"
565565
)
566566
};
567567

@@ -592,31 +592,31 @@ pub fn cli(gctx: &GlobalContext) -> Command {
592592
"\
593593
Rust's package manager
594594
595-
<green,bold>Usage:</> {usage}
595+
<bright-green,bold>Usage:</> {usage}
596596
597-
<green,bold>Options:</>
597+
<bright-green,bold>Options:</>
598598
{options}
599599
600-
<green,bold>Commands:</>
601-
<cyan,bold>build</>, <cyan,bold>b</> Compile the current package
602-
<cyan,bold>check</>, <cyan,bold>c</> Analyze the current package and report errors, but don't build object files
603-
<cyan,bold>clean</> Remove the target directory
604-
<cyan,bold>doc</>, <cyan,bold>d</> Build this package's and its dependencies' documentation
605-
<cyan,bold>new</> Create a new cargo package
606-
<cyan,bold>init</> Create a new cargo package in an existing directory
607-
<cyan,bold>add</> Add dependencies to a manifest file
608-
<cyan,bold>remove</> Remove dependencies from a manifest file
609-
<cyan,bold>run</>, <cyan,bold>r</> Run a binary or example of the local package
610-
<cyan,bold>test</>, <cyan,bold>t</> Run the tests
611-
<cyan,bold>bench</> Run the benchmarks
612-
<cyan,bold>update</> Update dependencies listed in Cargo.lock
613-
<cyan,bold>search</> Search registry for crates
614-
<cyan,bold>publish</> Package and upload this package to the registry
615-
<cyan,bold>install</> Install a Rust binary
616-
<cyan,bold>uninstall</> Uninstall a Rust binary
617-
<cyan>...</> See all commands with <cyan,bold>--list</>
618-
619-
See '<cyan,bold>cargo help</> <cyan><<command>></>' for more information on a specific command.\n",
600+
<bright-green,bold>Commands:</>
601+
<bright-cyan,bold>build</>, <bright-cyan,bold>b</> Compile the current package
602+
<bright-cyan,bold>check</>, <bright-cyan,bold>c</> Analyze the current package and report errors, but don't build object files
603+
<bright-cyan,bold>clean</> Remove the target directory
604+
<bright-cyan,bold>doc</>, <bright-cyan,bold>d</> Build this package's and its dependencies' documentation
605+
<bright-cyan,bold>new</> Create a new cargo package
606+
<bright-cyan,bold>init</> Create a new cargo package in an existing directory
607+
<bright-cyan,bold>add</> Add dependencies to a manifest file
608+
<bright-cyan,bold>remove</> Remove dependencies from a manifest file
609+
<bright-cyan,bold>run</>, <bright-cyan,bold>r</> Run a binary or example of the local package
610+
<bright-cyan,bold>test</>, <bright-cyan,bold>t</> Run the tests
611+
<bright-cyan,bold>bench</> Run the benchmarks
612+
<bright-cyan,bold>update</> Update dependencies listed in Cargo.lock
613+
<bright-cyan,bold>search</> Search registry for crates
614+
<bright-cyan,bold>publish</> Package and upload this package to the registry
615+
<bright-cyan,bold>install</> Install a Rust binary
616+
<bright-cyan,bold>uninstall</> Uninstall a Rust binary
617+
<bright-cyan>...</> See all commands with <bright-cyan,bold>--list</>
618+
619+
See '<bright-cyan,bold>cargo help</> <bright-cyan><<command>></>' for more information on a specific command.\n",
620620
))
621621
.arg(flag("version", "Print version info and exit").short('V'))
622622
.arg(flag("list", "List installed commands"))

src/bin/cargo/commands/add.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ pub fn cli() -> Command {
1818
.about("Add dependencies to a Cargo.toml manifest file")
1919
.override_usage(
2020
color_print::cstr!("\
21-
<cyan,bold>cargo add</> <cyan>[OPTIONS] <<DEP>>[@<<VERSION>>] ...</>
22-
<cyan,bold>cargo add</> <cyan>[OPTIONS]</> <cyan,bold>--path</> <cyan><<PATH>> ...</>
23-
<cyan,bold>cargo add</> <cyan>[OPTIONS]</> <cyan,bold>--git</> <cyan><<URL>> ...</>"
21+
<bright-cyan,bold>cargo add</> <bright-cyan>[OPTIONS] <<DEP>>[@<<VERSION>>] ...</>
22+
<bright-cyan,bold>cargo add</> <bright-cyan>[OPTIONS]</> <bright-cyan,bold>--path</> <bright-cyan><<PATH>> ...</>
23+
<bright-cyan,bold>cargo add</> <bright-cyan>[OPTIONS]</> <bright-cyan,bold>--git</> <bright-cyan><<URL>> ...</>"
2424
))
25-
.after_help(color_print::cstr!("Run `<cyan,bold>cargo help add</>` for more detailed information.\n"))
25+
.after_help(color_print::cstr!("Run `<bright-cyan,bold>cargo help add</>` for more detailed information.\n"))
2626
.group(clap::ArgGroup::new("selected").multiple(true).required(true))
2727
.args([
2828
clap::Arg::new("crates")

src/bin/cargo/commands/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn cli() -> Command {
5353
.arg_lockfile_path()
5454
.arg_ignore_rust_version()
5555
.after_help(color_print::cstr!(
56-
"Run `<cyan,bold>cargo help bench</>` for more detailed information.\n"
56+
"Run `<bright-cyan,bold>cargo help bench</>` for more detailed information.\n"
5757
))
5858
}
5959

src/bin/cargo/commands/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn cli() -> Command {
4343
.arg_lockfile_path()
4444
.arg_ignore_rust_version()
4545
.after_help(color_print::cstr!(
46-
"Run `<cyan,bold>cargo help build</>` for more detailed information.\n"
46+
"Run `<bright-cyan,bold>cargo help build</>` for more detailed information.\n"
4747
))
4848
}
4949

src/bin/cargo/commands/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn cli() -> Command {
4040
.arg_lockfile_path()
4141
.arg_ignore_rust_version()
4242
.after_help(color_print::cstr!(
43-
"Run `<cyan,bold>cargo help check</>` for more detailed information.\n"
43+
"Run `<bright-cyan,bold>cargo help check</>` for more detailed information.\n"
4444
))
4545
}
4646

src/bin/cargo/commands/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub fn cli() -> Command {
122122
),
123123
)
124124
.after_help(color_print::cstr!(
125-
"Run `<cyan,bold>cargo help clean</>` for more detailed information.\n"
125+
"Run `<bright-cyan,bold>cargo help clean</>` for more detailed information.\n"
126126
))
127127
}
128128

src/bin/cargo/commands/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn cli() -> Command {
4242
.arg_lockfile_path()
4343
.arg_ignore_rust_version()
4444
.after_help(color_print::cstr!(
45-
"Run `<cyan,bold>cargo help doc</>` for more detailed information.\n"
45+
"Run `<bright-cyan,bold>cargo help doc</>` for more detailed information.\n"
4646
))
4747
}
4848

src/bin/cargo/commands/fetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn cli() -> Command {
1111
.arg_manifest_path()
1212
.arg_lockfile_path()
1313
.after_help(color_print::cstr!(
14-
"Run `<cyan,bold>cargo help fetch</>` for more detailed information.\n"
14+
"Run `<bright-cyan,bold>cargo help fetch</>` for more detailed information.\n"
1515
))
1616
}
1717

src/bin/cargo/commands/fix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn cli() -> Command {
5757
.arg_lockfile_path()
5858
.arg_ignore_rust_version()
5959
.after_help(color_print::cstr!(
60-
"Run `<cyan,bold>cargo help fix</>` for more detailed information.\n"
60+
"Run `<bright-cyan,bold>cargo help fix</>` for more detailed information.\n"
6161
))
6262
}
6363

src/bin/cargo/commands/generate_lockfile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub fn cli() -> Command {
1010
.arg_lockfile_path()
1111
.arg_ignore_rust_version_with_help("Ignore `rust-version` specification in packages")
1212
.after_help(color_print::cstr!(
13-
"Run `<cyan,bold>cargo help generate-lockfile</>` for more detailed information.\n"
13+
"Run `<bright-cyan,bold>cargo help generate-lockfile</>` for more detailed information.\n"
1414
))
1515
}
1616

0 commit comments

Comments
 (0)