1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Lazygit handoff: suspend the TUI, run lazygit inheriting the
//! terminal, resume on exit.
//!
//! Same pattern editors-from-TUIs use everywhere. Lazygit runs as a
//! plain foreground child process — no tmux, no PTY juggling, no
//! flicker beyond the suspend/resume frame. The actual
//! `LeaveAlternateScreen` / `EnterAlternateScreen` dance lives in
//! the event loop (next to the tmux-attach handoff that does the
//! same thing) so this module can stay free of crossterm specifics.
use Path;
use Command;
/// Run lazygit in `project_root`, inheriting stdio. Returns when the
/// user quits lazygit (or it fails to start). Caller is responsible
/// for suspending / resuming the alternate screen around this call.
pub async
/// Best-effort check for `lazygit` on PATH. Resolves once at TUI
/// startup; the `L` keybind is a no-op (with a hint) when the binary
/// isn't there.