mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Add a number of new formats to inspect what sessions and clients a
window is present or active in. From Tyler Culp in GitHub issue 2034.
This commit is contained in:
15
session.c
15
session.c
@ -569,7 +569,20 @@ session_group_count(struct session_group *sg)
|
||||
|
||||
n = 0;
|
||||
TAILQ_FOREACH(s, &sg->sessions, gentry)
|
||||
n++;
|
||||
n++;
|
||||
return (n);
|
||||
}
|
||||
|
||||
/* Count number of clients attached to sessions in session group. */
|
||||
u_int
|
||||
session_group_attached_count(struct session_group *sg)
|
||||
{
|
||||
struct session *s;
|
||||
u_int n;
|
||||
|
||||
n = 0;
|
||||
TAILQ_FOREACH(s, &sg->sessions, gentry)
|
||||
n += s->attached;
|
||||
return (n);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user