tmux-python / tmux-python/libtmux

pane.reset() does not work

Open
#311 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
127
Avg merge
2h 13m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the pane.reset() entry point and compare the tmux command it generates with the separate p.cmd("send-keys", "-R") and p.cmd("clear-history") calls shown in the report. Reproduce the behavior with tmux 3.2, then verify that pane.reset() clears both history and scrollback as the equivalent shell commands do.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.