#636 New command: tmuxp shell
and #638 tmuxp shell_plus
Automatically preloads session, window, and pane via libtmux api objects and makes them available in a python console.
In python 3.7+, supports PYTHONBREAKPOINT
:
$ pip install ipdb
$ env PYTHONBREAKPOINT=ipdb.set_trace tmuxp shell
You can execute python directly via -c:
$ tmuxp shell -c 'print(session.name); print(window.name)'
my_server
my_window
$ tmuxp shell my_server -c 'print(session.name); print(window.name)'
my_server
my_window
$ tmuxp shell my_server my_window -c 'print(session.name); print(window.name)'
my_server
my_window
$ tmuxp shell my_server my_window -c 'print(window.name.upper())'
MY_WINDOW
tmuxp shell_plus
has autocompletion