ok/jj
1
0
Fork 0
forked from mirrors/jj

Add short a -e alias for --edit to prev and next

I'm not sure if this was an intentional omission, but I think it would be
useful to have `-e` as a short flag for `--edit`. I don't usually edit commits,
but I do use `prev` and `next` with edit to navigate to a commit that I want to
squash. Often this is easier than typing `--from` and `--into` plus the change
IDs.

If people want to edit commits we shouldn't stand in their way.
This commit is contained in:
Evan Mesterhazy 2024-04-20 08:14:04 -04:00 committed by Evan Mesterhazy
parent e0c53bcfc0
commit a2c49abbbe
3 changed files with 4 additions and 4 deletions

View file

@ -63,7 +63,7 @@ pub(crate) struct NextArgs {
/// Instead of creating a new working-copy commit on top of the target
/// commit (like `jj new`), edit the target commit directly (like `jj
/// edit`).
#[arg(long)]
#[arg(long, short)]
edit: bool,
}

View file

@ -57,7 +57,7 @@ pub(crate) struct PrevArgs {
#[arg(default_value = "1")]
offset: u64,
/// Edit the parent directly, instead of moving the working-copy commit.
#[arg(long)]
#[arg(long, short)]
edit: bool,
}

View file

@ -1191,7 +1191,7 @@ implied.
###### **Options:**
* `--edit` — Instead of creating a new working-copy commit on top of the target commit (like `jj new`), edit the target commit directly (like `jj edit`)
* `-e`, `--edit` — Instead of creating a new working-copy commit on top of the target commit (like `jj new`), edit the target commit directly (like `jj edit`)
Possible values: `true`, `false`
@ -1433,7 +1433,7 @@ implied.
###### **Options:**
* `--edit` — Edit the parent directly, instead of moving the working-copy commit
* `-e`, `--edit` — Edit the parent directly, instead of moving the working-copy commit
Possible values: `true`, `false`