tmux-python/libtmux

Bullet proofing for `capture_pane`

tony opened this issue · 0 comments

tony commented

This is an existential issue for libtmux / tmuxp

I think it's going to take some thinking.

Ideas:

  • sending a sentinel command made to figure out what the PS1 and shell is.
  • building in support for polling capture_pane() (similar to playwright / selenium)
  • finding "flake-free" / "rock-solid" loadouts for capturing pane text. Reliable enough to be used downstream in tests and across platforms

What we need:

  • What are the user's needs when running capture_pane()?
    • Is it just to boot up a daemon or process in the background?
    • Do they need consistency and determinism in shell commands across systems, or do they want to use their own environment's shell / configuration and deal with the output inconsistency themselves?
  • If they're willing to make any compromises: limiting their shell, using a barebones shell configuration in panes, or making it clear bringing your own shell / configuration may be hard to provide reliable results for

See also: #454