Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 25 additions & 25 deletions src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ fn print_list(gctx: &GlobalContext, is_verbose: bool) {
]);
drop_println!(
gctx,
color_print::cstr!("<green,bold>Installed Commands:</>")
color_print::cstr!("<bright-green,bold>Installed Commands:</>")
);
for (name, command) in list_commands(gctx) {
let known_external_desc = known_external_command_descriptions.get(name.as_str());
Expand Down Expand Up @@ -557,11 +557,11 @@ pub fn cli(gctx: &GlobalContext) -> Command {

let usage = if is_rustup() {
color_print::cstr!(
"<cyan,bold>cargo</> <cyan>[+toolchain] [OPTIONS] [COMMAND]</>\n <cyan,bold>cargo</> <cyan>[+toolchain] [OPTIONS]</> <cyan,bold>-Zscript</> <cyan><<MANIFEST_RS>> [ARGS]...</>"
"<bright-cyan,bold>cargo</> <cyan>[+toolchain] [OPTIONS] [COMMAND]</>\n <bright-cyan,bold>cargo</> <cyan>[+toolchain] [OPTIONS]</> <bright-cyan,bold>-Zscript</> <cyan><<MANIFEST_RS>> [ARGS]...</>"
)
} else {
color_print::cstr!(
"<cyan,bold>cargo</> <cyan>[OPTIONS] [COMMAND]</>\n <cyan,bold>cargo</> <cyan>[OPTIONS]</> <cyan,bold>-Zscript</> <cyan><<MANIFEST_RS>> [ARGS]...</>"
"<bright-cyan,bold>cargo</> <cyan>[OPTIONS] [COMMAND]</>\n <bright-cyan,bold>cargo</> <cyan>[OPTIONS]</> <bright-cyan,bold>-Zscript</> <cyan><<MANIFEST_RS>> [ARGS]...</>"
)
};

Expand Down Expand Up @@ -592,31 +592,31 @@ pub fn cli(gctx: &GlobalContext) -> Command {
"\
Rust's package manager

<green,bold>Usage:</> {usage}
<bright-green,bold>Usage:</> {usage}

<green,bold>Options:</>
<bright-green,bold>Options:</>
{options}

<green,bold>Commands:</>
<cyan,bold>build</>, <cyan,bold>b</> Compile the current package
<cyan,bold>check</>, <cyan,bold>c</> Analyze the current package and report errors, but don't build object files
<cyan,bold>clean</> Remove the target directory
<cyan,bold>doc</>, <cyan,bold>d</> Build this package's and its dependencies' documentation
<cyan,bold>new</> Create a new cargo package
<cyan,bold>init</> Create a new cargo package in an existing directory
<cyan,bold>add</> Add dependencies to a manifest file
<cyan,bold>remove</> Remove dependencies from a manifest file
<cyan,bold>run</>, <cyan,bold>r</> Run a binary or example of the local package
<cyan,bold>test</>, <cyan,bold>t</> Run the tests
<cyan,bold>bench</> Run the benchmarks
<cyan,bold>update</> Update dependencies listed in Cargo.lock
<cyan,bold>search</> Search registry for crates
<cyan,bold>publish</> Package and upload this package to the registry
<cyan,bold>install</> Install a Rust binary
<cyan,bold>uninstall</> Uninstall a Rust binary
<cyan>...</> See all commands with <cyan,bold>--list</>

See '<cyan,bold>cargo help</> <cyan><<command>></>' for more information on a specific command.\n",
<bright-green,bold>Commands:</>
<bright-cyan,bold>build</>, <bright-cyan,bold>b</> Compile the current package
<bright-cyan,bold>check</>, <bright-cyan,bold>c</> Analyze the current package and report errors, but don't build object files
<bright-cyan,bold>clean</> Remove the target directory
<bright-cyan,bold>doc</>, <bright-cyan,bold>d</> Build this package's and its dependencies' documentation
<bright-cyan,bold>new</> Create a new cargo package
<bright-cyan,bold>init</> Create a new cargo package in an existing directory
<bright-cyan,bold>add</> Add dependencies to a manifest file
<bright-cyan,bold>remove</> Remove dependencies from a manifest file
<bright-cyan,bold>run</>, <bright-cyan,bold>r</> Run a binary or example of the local package
<bright-cyan,bold>test</>, <bright-cyan,bold>t</> Run the tests
<bright-cyan,bold>bench</> Run the benchmarks
<bright-cyan,bold>update</> Update dependencies listed in Cargo.lock
<bright-cyan,bold>search</> Search registry for crates
<bright-cyan,bold>publish</> Package and upload this package to the registry
<bright-cyan,bold>install</> Install a Rust binary
<bright-cyan,bold>uninstall</> Uninstall a Rust binary
<cyan>...</> See all commands with <bright-cyan,bold>--list</>

See '<bright-cyan,bold>cargo help</> <cyan><<command>></>' for more information on a specific command.\n",
))
.arg(flag("version", "Print version info and exit").short('V'))
.arg(flag("list", "List installed commands"))
Expand Down
8 changes: 4 additions & 4 deletions src/bin/cargo/commands/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ pub fn cli() -> Command {
.about("Add dependencies to a Cargo.toml manifest file")
.override_usage(
color_print::cstr!("\
<cyan,bold>cargo add</> <cyan>[OPTIONS] <<DEP>>[@<<VERSION>>] ...</>
<cyan,bold>cargo add</> <cyan>[OPTIONS]</> <cyan,bold>--path</> <cyan><<PATH>> ...</>
<cyan,bold>cargo add</> <cyan>[OPTIONS]</> <cyan,bold>--git</> <cyan><<URL>> ...</>"
<bright-cyan,bold>cargo add</> <cyan>[OPTIONS] <<DEP>>[@<<VERSION>>] ...</>
<bright-cyan,bold>cargo add</> <cyan>[OPTIONS]</> <bright-cyan,bold>--path</> <cyan><<PATH>> ...</>
<bright-cyan,bold>cargo add</> <cyan>[OPTIONS]</> <bright-cyan,bold>--git</> <cyan><<URL>> ...</>"
))
.after_help(color_print::cstr!("Run `<cyan,bold>cargo help add</>` for more detailed information.\n"))
.after_help(color_print::cstr!("Run `<bright-cyan,bold>cargo help add</>` for more detailed information.\n"))
.group(clap::ArgGroup::new("selected").multiple(true).required(true))
.args([
clap::Arg::new("crates")
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help bench</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help bench</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help build</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help build</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help check</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help check</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub fn cli() -> Command {
),
)
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help clean</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help clean</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help doc</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help doc</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help fetch</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help fetch</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help fix</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help fix</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/generate_lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version_with_help("Ignore `rust-version` specification in packages")
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help generate-lockfile</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help generate-lockfile</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn cli() -> Command {
.arg_registry("Registry to search packages in")
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help info</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help info</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn cli() -> Command {
.arg_registry("Registry to use")
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help init</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help init</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub fn cli() -> Command {
.arg_timings()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help install</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help install</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/locate_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn cli() -> Command {
.arg_silent_suggestion()
.arg_manifest_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help locate-project</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help locate-project</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn cli() -> Command {
)
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help login</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help login</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/logout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn cli() -> Command {
.arg_registry("Registry to use")
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help logout</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help logout</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help metadata</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help metadata</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn cli() -> Command {
.arg_registry("Registry to use")
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help new</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help new</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn cli() -> Command {
.arg(opt("token", "API token to use when authenticating").value_name("TOKEN"))
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help owner</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help owner</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help package</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help package</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/pkgid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help pkgid</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help pkgid</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help publish</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help publish</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/read_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn cli() -> Command {
"\
DEPRECATED: Print a JSON representation of a Cargo.toml manifest.

Use `<cyan,bold>cargo metadata --no-deps</>` instead.\
Use `<bright-cyan,bold>cargo metadata --no-deps</>` instead.\
"
))
.arg_silent_suggestion()
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn cli() -> clap::Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help remove</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help remove</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn cli() -> Command {
subcommand("report")
.about("Generate and display various kinds of reports")
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help report</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help report</>` for more detailed information.\n"
))
.subcommand_required(true)
.arg_required_else_help(true)
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn cli() -> Command {
.arg_unit_graph()
.arg_timings()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help run</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help run</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help rustc</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help rustc</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help rustdoc</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help rustdoc</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn cli() -> Command {
.arg_registry("Registry to search packages in")
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help search</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help search</>` for more detailed information.\n"
))
}

Expand Down
4 changes: 2 additions & 2 deletions src/bin/cargo/commands/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help test</>` for more detailed information.\n\
Run `<cyan,bold>cargo test -- --help</>` for test binary options.\n",
"Run `<bright-cyan,bold>cargo help test</>` for more detailed information.\n\
Run `<bright-cyan,bold>cargo test -- --help</>` for test binary options.\n",
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help tree</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help tree</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn cli() -> Command {
.help_heading(heading::TARGET_SELECTION),
)
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help uninstall</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help uninstall</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub fn cli() -> Command {
.arg_lockfile_path()
.arg_ignore_rust_version_with_help("Ignore `rust-version` specification in packages")
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help update</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help update</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn cli() -> Command {
.arg_manifest_path()
.arg_lockfile_path()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help vendor</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help vendor</>` for more detailed information.\n"
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn cli() -> Command {
.about("Show version information")
.arg_silent_suggestion()
.after_help(color_print::cstr!(
"Run `<cyan,bold>cargo help version</>` for more detailed information.\n"
"Run `<bright-cyan,bold>cargo help version</>` for more detailed information.\n"
))
}

Expand Down
Loading