You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have many sessions on my server, so I want to get the session name of the monitored session and attach it to the notification email. I tried tmux display-message -p '#S' (https://superuser.com/a/410197/1677998):
However, it seems that the attached session is the last attached session instead of the monitored session. Then I tried to get the tty name of the monitored session and find the corresponding session (https://superuser.com/a/1202709/1677998):
if [[ -n"$TMUX_PANE" ]];then
session_name=$(tmux list-panes -t "$TMUX_PANE" -F '#S'| head -n1)fi
However, TMUX_PANE is not defined.
Is there any way to get the session name of the monitored session in the custom command? I need this because attaching up to ten sessions one by one to find the one that finishes is very painful.
The text was updated successfully, but these errors were encountered:
I have many sessions on my server, so I want to get the session name of the monitored session and attach it to the notification email. I tried
tmux display-message -p '#S'
(https://superuser.com/a/410197/1677998):However, it seems that the attached session is the last attached session instead of the monitored session. Then I tried to get the tty name of the monitored session and find the corresponding session (https://superuser.com/a/1202709/1677998):
However,
tty=$(tty)
returns anot a tty
result.I also tried https://superuser.com/a/1357132/1677998:
However,
TMUX_PANE
is not defined.Is there any way to get the session name of the monitored session in the custom command? I need this because attaching up to ten sessions one by one to find the one that finishes is very painful.
The text was updated successfully, but these errors were encountered: