libtmux
libtmux copied to clipboard
pane.reset() does not work
Hi,
First of, great tool!
I can see that pane.reset() does not work (at least for me), I am running tmux 3.2 on osx bs and zsh.
When running pane.reset(), nothing happens, meaning the history and scrollback are not cleared:
In [49]: p.reset()
self.stdout for /usr/local/bin/tmux send-keys -t %23 -R \; clear-history:
This does work for me:
Using libtmux:
In [62]: p.cmd("send-keys", "-R")
...: p.cmd("clear-history")
self.stdout for /usr/local/bin/tmux send-keys -t %23 -R:
[]
self.stdout for /usr/local/bin/tmux clear-history -t %23:
[]
Out[62]: <libtmux.common.tmux_cmd at 0x1042bed00>
Or in bash/zsh
/usr/local/bin/tmux send-keys -t %23 -R \; clear-history -t %23
Fixed in v0.56.0 (2026-05-10) and refined into one atomic command sequence in v0.57.0 (2026-05-17): Pane.reset() dispatches send-keys -t <pane_id> -R ; clear-history -t <pane_id> as discrete argv tokens.
- API docs:
Pane.reset()reference - Migration notes: Migration guide
- Source:
src/libtmux/pane.pylines 2591–2615