Dear All
I have a one-line bash script, file name ~/echotmux,
echo $(tmux display-message -p '#W')
which correctly displays the window name when run in individual windows (bash ~/echotmux). With the following key binding,
:bind C-e command-prompt -p "Command:" "run \"tmux list-panes -s -F '##{session_name}:##{window_index}.##{pane_index}'|xargs -I PANE tmux send-keys -t PANE '%1' Enter\"",
in the command sequence
C-b C-e bash ~/echotmux
the tmux command in ~/echotmux is apparently first executed in the source window (with the window name SOURCE say) such that SOURCE is displayed in all windows.
How should ~/echotmux or the key binding, or both, be re-written such that the correct window name be displayed from the C-b C-e sequence?
Thanks all in advance
Boryeu Mao