Repository navigation
fix(os): support OSC 52 clipboard sequences and Wayland wl-copy fallback - #45
Conversation
|
Confidence: 4/5Small, self-contained change to one function plus a stdin fix. I merged it with current main, built it and ran it on macOS (Ghostty) and in a Linux VM. The remaining risk is the lost error reporting and untested tmux/SSH paths. SummaryThanks Felipe, this is a nice improvement. OSC 52 plus A few things to look at:
Mapflowchart LR
GUI[gui/mod.rs + controller/*] --> CP[Platform::copy_to_clipboard]
CP --> OSC[write_osc52_clipboard -> stdout]
CP --> T[spawned thread]
T --> CB[CmdBuilder::run]
CB --> RS[run: stdin write + drop]
T --> TOOLS[pbcopy / clip / wl-copy / xclip / xsel]
OSC --> B64[base64_encode + tests]
Regressions
MigrationsNone. No config, keybinding or format changes. Before merging
|
Summary
Enhances clipboard copy functionality across modern terminal environments and Linux display servers:
\x1b]52;c;<base64>\x07, with tmux passthrough wrapping whenTMUXis set). This enables clipboard copying over SSH, remote tmux sessions, and modern terminals (Alacritty, Kitty, WezTerm, iTerm2, foot, ghostty, etc.) without requiring local clipboard binaries.wl-copy): On Linux, trieswl-copyfirst before falling back toxclipandxsel.CmdBuilder::run_with_stdin, sending an immediate EOF so clipboard processes do not hang waiting for standard input.src/os/platform.rs.Verification
cargo fmtchecked.cargo test --bin lazygitrs(372 passed).