Skip to content

pane.send_keys() doesn't send cmd to correct pane when cmd has a -t flag  #533

Closed
@sgherdao

Description

@sgherdao

Hi @tony,

I am using pane.send_keys() with ssh and its -t flag (Force pseudo-terminal allocation.)
The command is not sent to the correct target pane, but to the current active pane.

It looks like it is related to the following commit:
#ee8a7054
startswith vs in

The below code should be sufficient to reproduce the problem

import libtmux

tmux_server = libtmux.server.Server()
tmux_session = tmux_server.new_session(session_name="repro")
tmux_window = tmux_session.windows[0]
pane = tmux_window.panes[0]
# this will not work
pane.send_keys("ssh -t user@notworking")
# this works
pane.send_keys("ssh user@working")

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions