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

Add c alias for check #6218

Merged
merged 1 commit into from
Nov 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/bin/cargo/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use cargo::ops;

pub fn cli() -> App {
subcommand("check")
// subcommand aliases are handled in commands::builtin_exec() and cli::expand_aliases()
// .alias("c")
.about("Check a local package and all of its dependencies for errors")
.arg_package_spec(
"Package(s) to check",
Expand Down
3 changes: 2 additions & 1 deletion src/bin/cargo/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn builtin_exec(cmd: &str) -> Option<BuiltinExec> {
let exec = match cmd {
"bench" => bench::exec,
"build" | "b" => build::exec,
"check" => check::exec,
"check" | "c" => check::exec,
"clean" => clean::exec,
"doc" => doc::exec,
"fetch" => fetch::exec,
Expand Down Expand Up @@ -77,6 +77,7 @@ pub fn builtin_exec(cmd: &str) -> Option<BuiltinExec> {

let alias_for = match cmd {
"b" => Some("build"),
"c" => Some("check"),
"r" => Some("run"),
"t" => Some("test"),
_ => None,
Expand Down