Add a -r flag to switch-client to toggle the client read-only flag. From

Johan Commelin.
This commit is contained in:
Nicholas Marriott
2011-08-16 10:00:52 +00:00
parent f95f792ddf
commit 88e9079870
4 changed files with 29 additions and 10 deletions

View File

@ -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);