Skip to content

Commit

Permalink
Add c alias for check
Browse files Browse the repository at this point in the history
  • Loading branch information
ordovicia committed Nov 19, 2018
1 parent 61c83ba commit 2a66732
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 2a66732

Please sign in to comment.