Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong session_info in nested tmux session #359

Closed
happyman opened this issue Feb 23, 2024 · 0 comments · Fixed by #389
Closed

Wrong session_info in nested tmux session #359

happyman opened this issue Feb 23, 2024 · 0 comments · Fixed by #389

Comments

@happyman
Copy link

happyman commented Feb 23, 2024

I have a 6 tmux sessions named p1~p6, and the following script to create a group to show p1 to p6 at once.

#!/bin/bash

tt="tmux att -t"
SESSION=test
tmux kill-session -t $SESSION
tmux new-session -t $SESSION -d
tmux rename-session -t $SESSION $SESSION
tmux ls

tmux split-window -h -p 50 -t $SESSION:0
tmux split-window -v -p 66 -t $SESSION:0
tmux split-window -v -p 33 -t $SESSION:0
tmux select-pane -t $SESSION:0.0
tmux split-window -v -p 66 -t $SESSION:0
tmux split-window -v -p 33 -t $SESSION:0
tmux move-window -r -t $SESSION:0
tmux ls

tmux send-keys -t $SESSION:0.0  "TMUX='' $tt p1" C-m
tmux send-keys -t $SESSION:0.1  "TMUX='' $tt p2" C-m
tmux send-keys -t $SESSION:0.2  "TMUX='' $tt p3" C-m
tmux send-keys -t $SESSION:0.3  "TMUX='' $tt p4" C-m
tmux send-keys -t $SESSION:0.4  "TMUX='' $tt p5" C-m
tmux send-keys -t $SESSION:0.5  "TMUX='' $tt p6" C-m

tmux att -t $SESSION

but the session info will be the last atteched one.
for example, if I attach to p2 within session test, then all session names displayed in status bar will become p2.

is there anyway to fix it?

xx4h added a commit to xx4h/tmux-powerline that referenced this issue Apr 2, 2024
* tmux display-message does seem to retrieve
  global "current" or "active" information whereas
  native format shows "local" session/window/pane
  information

fix erikw#359
@xx4h xx4h closed this as completed in #389 Apr 3, 2024
xx4h added a commit that referenced this issue Apr 3, 2024
* tmux display-message does seem to retrieve
  global "current" or "active" information whereas
  native format shows "local" session/window/pane
  information

fix #359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant