Implement session persistence pass 1 with multi-window restore

This commit is contained in:
Lawrence Chen 2026-02-22 15:39:59 -08:00
parent 1809b06867
commit 927b0eb2d1
20 changed files with 3434 additions and 33 deletions

View file

@ -23,6 +23,18 @@ _cmux_send() {
fi
}
_cmux_restore_scrollback_once() {
local path="${CMUX_RESTORE_SCROLLBACK_FILE:-}"
[[ -n "$path" ]] || return 0
unset CMUX_RESTORE_SCROLLBACK_FILE
if [[ -r "$path" ]]; then
/bin/cat -- "$path" 2>/dev/null || true
/bin/rm -f -- "$path" >/dev/null 2>&1 || true
fi
}
_cmux_restore_scrollback_once
# Throttle heavy work to avoid prompt latency.
_CMUX_PWD_LAST_PWD="${_CMUX_PWD_LAST_PWD:-}"
_CMUX_GIT_LAST_PWD="${_CMUX_GIT_LAST_PWD:-}"