From 697e9adc54249cab6c714e585da768cd6b92d3f2 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Mon, 15 Jul 2024 11:57:36 -0700 Subject: [PATCH] cli `branch create/set`: add `--at/--to` aliases to `-r` Now that `jj move` does not accept `-r`, `jj set --to` seems more useful than `jj set -r`. I am not sure whether `-r` should be kept or removed. I was also considering adding `create --to` as alias for `create -r`, but I am hoping `--at` will be easy enough to remember since it's the preposition one would think of. --- cli/src/commands/branch/create.rs | 2 +- cli/src/commands/branch/set.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/branch/create.rs b/cli/src/commands/branch/create.rs index b23cb666d8..bcdc0e1e89 100644 --- a/cli/src/commands/branch/create.rs +++ b/cli/src/commands/branch/create.rs @@ -25,7 +25,7 @@ use crate::ui::Ui; #[derive(clap::Args, Clone, Debug)] pub struct BranchCreateArgs { /// The branch's target revision - #[arg(long, short)] + #[arg(long, short, visible_alias = "at")] revision: Option, /// The branches to create diff --git a/cli/src/commands/branch/set.rs b/cli/src/commands/branch/set.rs index 2530df96d9..c7cc087ba7 100644 --- a/cli/src/commands/branch/set.rs +++ b/cli/src/commands/branch/set.rs @@ -25,7 +25,7 @@ use crate::ui::Ui; #[derive(clap::Args, Clone, Debug)] pub struct BranchSetArgs { /// The branch's target revision - #[arg(long, short)] + #[arg(long, short, visible_alias = "to")] revision: Option, /// Allow moving the branch backwards or sideways