v0.4.3
Zero-config recording under kitty and WezTerm shell integration
kitty's and WezTerm's shell-integration scripts are commonly installed
manually in rc files (kitty's docs recommend it for exec zsh, tmux,
sudo, and SSH setups; wezterm.sh is distributed for exactly this). A
shell inside backscroll run can therefore be emitting their marks with
no backscroll snippet — and now that alone is enough to record:
- kitty (bash + zsh): command text decoded from the shell-quoted
133;C;cmdline=%qmark (bashprintf %q, zshprint -f %q, including
$'...'ANSI-C segments and raw semicolons), exit codes from133;D,
cwd from kitty'sOSC 7 kitty-shell-cwd://(new: both OSC 7 schemes
are handled). - WezTerm (bash + zsh): command text from the base64
OSC 1337 SetUserVar=WEZTERM_PROGuser var, exit codes from133;D,
cwd fromOSC 7 file://. The var is consumed — never stored into
recorded output, soshow --rawreplay can't clobber your live
terminal's user vars. Other OSC 1337 traffic (iTerm2File=images,
other user vars) passes through untouched. - With backscroll's own snippet installed too, nothing double-records
and the snippet's exact command mark wins.
Found upstream, worked around: wezterm.sh word-splits its own base64
__wezterm_set_user_var encodes with an unquoted
`echo -n "$2" | base64` substitution. GNU base64 wraps at 76
columns, the shell word-splits the lines, and printf re-uses its format
string — so on Linux any command longer than 57 bytes arrives as a
truncated first chunk plus garbage SetUserVar=<line>=<line> sequences.
backscroll detects the split and reassembles the full command line (and
swallows the shrapnel). Caught live: a 125-char command recorded as its
first 57 bytes.
Docs & tests
docs/osc133.md: gotcha 13 (kitty'scmdline=is shell-quoted —
don't split params on;) and gotcha 14 (the wezterm word-split bug,
and OSC 7 scheme flavors).- New E2E suite
shell/test_kitty_wezterm.py: 26 checks in CI against
the real, pinnedkitty.bash, zshkitty-integration(via kitty's
documented manual-install block), andwezterm.sh, under both bash
and zsh — quotes/semicolons, the >57-byte path, Ctrl-C exit 130,
both OSC 7 schemes, no phantom stubs, no metadata leaks.
Install: curl -sSfL https://raw.githubusercontent.com/soren-achebe/backscroll/main/install.sh | sh · brew install soren-achebe/tap/backscroll · deb/rpm/tarballs below. Fully compatible with 0.4.x databases.