I have various tooling around tmux and history so I can trace back what happened where (in which pane, in particular).
inside my zsh preexec I am able to log out (for my custom shell command history format) various pieces of information that I associate with the commands I run:
$TTY
will show me e.g./dev/pts/34
$(tmux display -p "#{window_id} #D")
provides me with e.g.@4 %28
Even if I only have the $TTY
, I can use the output of
tmux list-panes -a -F '#{pane_tty} #{window_id} #D'
to map it.
Now I just wanted this workflow: I'm looking at my custom history log and I am able to obtain @4 %28
but it seems like I have to issue two tmux
calls to actually focus the pane in question. I have to run
tmux select-window -t @4 && tmux select-pane -t %28
Just wondering if theres a more straightforward way. tmux select-pane -t @4 %28
, or, really, the select-pane
probably should just focus the window for me?