libtmux icon indicating copy to clipboard operation
libtmux copied to clipboard

pane.reset() does not work

Open ghost opened this issue 5 years ago • 1 comments

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

ghost avatar May 14 '21 23:05 ghost

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.

tony avatar Nov 21 '26 13:11 tony