Skip to content

Commit 4686c93

Browse files
committed
Add documentation for v0.5.0, bump version, use ansi-to-tui fork
1 parent 5689e9c commit 4686c93

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

Cargo.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "lazyjj"
33
description = "TUI for Jujutsu/jj"
4-
version = "0.4.2"
4+
version = "0.5.0"
55
edition = "2021"
66
license = "Apache-2.0"
77
readme = "README.md"
@@ -15,7 +15,7 @@ pkg-url = "{ repo }/releases/download/v{ version }/lazyjj-v{ version }-{ target
1515

1616

1717
[dependencies]
18-
ansi-to-tui = "7.0.0"
18+
ansi-to-tui = { git = "https://github.com/Cretezy/ansi-to-tui.git", rev = "74bd97e" }
1919
anyhow = "1.0.95"
2020
chrono = "0.4.39"
2121
clap = { version = "4.5.27", features = ["derive"] }

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ https://github.com/Cretezy/lazyjj/assets/2672503/b5e6b4f1-ebdb-448f-af9e-361e86f
1616
- See different revset with `r`
1717
- Set a bookmark to selected change with `b`
1818
- Fetch/push with `f`/`p`
19+
- Squash current changes to selected change with `s`
1920
- Files
2021
- View files in current change and diff in side panel
2122
- See a change's files from the log tab with `Enter`
@@ -27,6 +28,7 @@ https://github.com/Cretezy/lazyjj/assets/2672503/b5e6b4f1-ebdb-448f-af9e-361e86f
2728
- Track bookmarks with `t`, untrack bookmarks with `T`
2829
- Command log: View every command lazyjj executes
2930
- Config: Configure lazyjj with your jj config
31+
- Command box: Run jj commands directly in lazyjj with `:`
3032
- Help: See all key mappings with `h`/`?`
3133

3234
## Setup
@@ -49,6 +51,8 @@ You can optionally configure the following options through your jj config:
4951
- If `lazyjj.diff-format` is not set but `ui.diff.format` is, the latter will be used
5052
- `lazyjj.bookmark-prefix`: Change the bookmark name prefix for generated bookmark names. Defaults to `push-`
5153
- If `lazyjj.bookmark-prefix` is not set but `git.push-bookmark-prefix` is, the latter will be used
54+
- `lazyjj.layout`: Changes the layout of the main and details panel. Can be `horizontal` (default) or `vertical`
55+
- `lazyjj.layout-percent`: Changes the layout split of the main page. Should be number between 0 and 100. Defaults to `50`
5256

5357
Example: `jj config set --user lazyjj.diff-format "color-words"` (for storing in [user config file](https://martinvonz.github.io/jj/latest/config/#user-config-file), repo config is also supported)
5458

@@ -75,6 +79,7 @@ See all key mappings for the current tab with `h` or `?`.
7579
- Scroll down/up by one line with `Ctrl+e`/`Ctrl+y`
7680
- Scroll down/up by a half page with `Ctrl+d`/`Ctrl+u`
7781
- Scroll down/up by a full page with `Ctrl+f`/`Ctrl+b`
82+
- Open a command popup to run jj commands using `:` (jj prefix not required, e.g. write `new main` instead of `jj new main`)
7883

7984
### Log tab
8085

@@ -94,10 +99,12 @@ See all key mappings for the current tab with `h` or `?`.
9499
- Scroll in bookmark list with `j`/`k`
95100
- Create a new bookmark with `c`
96101
- Use auto-generated name with `g`
102+
- Squash current changes (in @) to the selected change with `s`
97103
- Git fetch with `f` (`jj git fetch`)
98104
- Git fetch all remotes with `F` (`jj git fetch --all-remotes`)
99105
- Git push with `p` (`jj git push`)
100106
- Git push all bookmarks with `P` (`jj git push --all`)
107+
- Use `Ctrl+p` or `Ctrl+P` to include pushing new bookmarks (`--allow-new`)
101108

102109
### Files tab
103110

src/app.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ impl<'a> App<'a> {
200200
self.get_command_log_tab(commander)?.update(commander)?;
201201
}
202202
_ => {}
203-
204203
};
205204
}
206205
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ fn restore_terminal() -> Result<()> {
232232

233233
fn install_panic_hook() {
234234
let original_hook = std::panic::take_hook();
235-
std::panic::set_hook(Box::new( move |info| {
235+
std::panic::set_hook(Box::new(move |info| {
236236
if let Err(err) = restore_terminal() {
237237
eprintln!("Failed to restore terminal: {err}");
238238
}

src/ui/log_tab.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ impl Component for LogTab<'_> {
540540
Text::from(vec![
541541
Line::from("Are you sure you want to create a new change?"),
542542
Line::from(format!("New parent: {}", self.head.change_id.as_str())),
543-
]).fg(Color::default()),
543+
])
544+
.fg(Color::default()),
544545
)
545546
.with_yes_button(ButtonLabel::YES.clone())
546547
.with_no_button(ButtonLabel::NO.clone())
@@ -556,7 +557,8 @@ impl Component for LogTab<'_> {
556557
Text::from(vec![
557558
Line::from("Are you sure you want to squash @ into this change?"),
558559
Line::from(format!("Squash into {}", self.head.change_id.as_str())),
559-
]).fg(Color::default()),
560+
])
561+
.fg(Color::default()),
560562
)
561563
.with_yes_button(ButtonLabel::YES.clone())
562564
.with_no_button(ButtonLabel::NO.clone())
@@ -582,7 +584,8 @@ impl Component for LogTab<'_> {
582584
Text::from(vec![
583585
Line::from("Are you sure you want to edit an existing change?"),
584586
Line::from(format!("Change: {}", self.head.change_id.as_str())),
585-
]).fg(Color::default()),
587+
])
588+
.fg(Color::default()),
586589
)
587590
.with_yes_button(ButtonLabel::YES.clone())
588591
.with_no_button(ButtonLabel::NO.clone())
@@ -610,7 +613,8 @@ impl Component for LogTab<'_> {
610613
Text::from(vec![
611614
Line::from("Are you sure you want to abandon this change?"),
612615
Line::from(format!("Change: {}", self.head.change_id.as_str())),
613-
]).fg(Color::default()),
616+
])
617+
.fg(Color::default()),
614618
)
615619
.with_yes_button(ButtonLabel::YES.clone())
616620
.with_no_button(ButtonLabel::NO.clone())
@@ -743,7 +747,10 @@ impl Component for LogTab<'_> {
743747
("n".to_owned(), "new change".to_owned()),
744748
("N".to_owned(), "new with message".to_owned()),
745749
("a".to_owned(), "abandon change".to_owned()),
746-
("s".to_owned(), "squash @ into the selected change".to_owned()),
750+
(
751+
"s".to_owned(),
752+
"squash @ into the selected change".to_owned(),
753+
),
747754
("b".to_owned(), "set bookmark".to_owned()),
748755
("f".to_owned(), "git fetch".to_owned()),
749756
("F".to_owned(), "git fetch all remotes".to_owned()),

0 commit comments

Comments
 (0)