From 404f5d0f3d973883fe6f77cbdc22e782b97c04a8 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 29 Jun 2022 13:45:00 +0800 Subject: [PATCH 1/2] Add alias `maturin b` for `maturin build` subcommand Just like `cargo b` for `cargo build` --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 61971b359..9074baeea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,7 @@ use std::str::FromStr; /// Build and publish crates with pyo3, rust-cpython and cffi bindings as well /// as rust binaries as python packages enum Opt { - #[clap(name = "build")] + #[clap(name = "build", alias = "b")] /// Build the crate into python packages Build { /// Build artifacts in release mode, with optimizations From 8431429eb124829213b9691e262d9c1ecbdb7984 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 29 Jun 2022 13:47:00 +0800 Subject: [PATCH 2/2] Add alias `maturin dev` for `maturin develop` subcommand Cargo use `cargo d` for `cargo doc`, to avoid possible confusion we use `dev` instead --- Changelog.md | 1 + src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 38a9191a9..294850306 100644 --- a/Changelog.md +++ b/Changelog.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add `--repository` option to `maturin upload` command in [#987](https://github.com/PyO3/maturin/pull/987) * Only lookup bundled Python sysconfig when interpreters aren't specified as file path in [#988](https://github.com/PyO3/maturin/pull/988) * Find CPython upper to 3.12 and PyPy upper to 3.10 in [#993](https://github.com/PyO3/maturin/pull/993) +* Add short alias `maturin b` for `maturin build` and `maturin dev` for `maturin develop` subcommands in [#994](https://github.com/PyO3/maturin/pull/994) ## [0.12.20] - 2022-06-15 diff --git a/src/main.rs b/src/main.rs index 9074baeea..d7db91a8a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,7 +67,7 @@ enum Opt { #[clap(long)] target: Option, }, - #[clap(name = "develop")] + #[clap(name = "develop", alias = "dev")] /// Installs the crate as module in the current virtualenv /// /// Note that this command doesn't create entrypoints