Skip to content

Commit

Permalink
cli branch create/set: add --to aliases for -r
Browse files Browse the repository at this point in the history
Now that `jj move` does not accept `-r` (since it has `--from` and `--to`), `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.
  • Loading branch information
ilyagr committed Jul 16, 2024
1 parent 3043b83 commit 5674e6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/src/commands/branch/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RevisionArg>,

/// The branches to create
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/branch/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RevisionArg>,

/// Allow moving the branch backwards or sideways
Expand Down

0 comments on commit 5674e6e

Please sign in to comment.