mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-13 23:38:52 +02:00
Add a -r flag to switch-client to toggle the client read-only flag. From
Johan Commelin.
This commit is contained in:
@ -33,7 +33,7 @@ const struct cmd_entry cmd_list_clients_entry = {
|
||||
"list-clients", "lsc",
|
||||
"t:", 0, 0,
|
||||
CMD_TARGET_SESSION_USAGE,
|
||||
0,
|
||||
CMD_READONLY,
|
||||
NULL,
|
||||
NULL,
|
||||
cmd_list_clients_exec
|
||||
@ -68,9 +68,10 @@ cmd_list_clients_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
|
||||
if (s != NULL && s != c->session)
|
||||
continue;
|
||||
ctx->print(ctx, "%s: %s [%ux%u %s]%s", c->tty.path,
|
||||
ctx->print(ctx, "%s: %s [%ux%u %s]%s%s", c->tty.path,
|
||||
c->session->name, c->tty.sx, c->tty.sy,
|
||||
c->tty.termname, s_utf8);
|
||||
c->tty.termname, s_utf8,
|
||||
c->flags & CLIENT_READONLY ? " (ro)" : "");
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
Reference in New Issue
Block a user