On Wed, Sep 28, 2011 at 07:42:03PM +0100, Nicholas Marriott wrote:
> This looks good, but I think CLIENT_REDRAW (set by
> server_redraw_client()) will already redraw the status line so no need
> to set CLIENT_STATUS as well.
Yeah, this seems superfluous.
> Although, are you sure -S should redraw the entire client or should it
> not just redraw just the status line?
You're right, the former is probably overkill (and even more so for my
use case). I changed it in the patch attached.
Thanks,
Marco
# HG changeset patch
# User Marco Beck <mb...@eaddrinuse.net>
# Date 1317236639 -7200
# Node ID 5b89a79d5b1a7ce4515e97f11068d54aaa74d903
# Parent 2a041ad30bca5f26d6ca8c056957e0ce364a8305
Add option '-S' to refresh-client to update a client's
status bar.
diff --git a/cmd-refresh-client.c b/cmd-refresh-client.c
--- a/cmd-refresh-client.c
+++ b/cmd-refresh-client.c
@@ -28,8 +28,8 @@
const struct cmd_entry cmd_refresh_client_entry = {
"refresh-client", "refresh",
- "t:", 0, 0,
- CMD_TARGET_CLIENT_USAGE,
+ "St:", 0, 0,
+ "[-S] " CMD_TARGET_CLIENT_USAGE,
0,
NULL,
NULL,
@@ -45,7 +45,11 @@
if ((c = cmd_find_client(ctx, args_get(args, 't'))) == NULL)
return (-1);
- server_redraw_client(c);
+ if (args_has(args, 'S')) {
+ status_update_jobs(c);
+ server_status_client(c);
+ } else
+ server_redraw_client(c);
return (0);
}
diff --git a/tmux.1 b/tmux.1
--- a/tmux.1
+++ b/tmux.1
@@ -691,11 +691,17 @@
are invalid if
.Fl t
is used.
-.It Ic refresh-client Op Fl t Ar target-client
+.It Xo Ic refresh-client
+.Op Fl S
+.Op Fl t Ar target-client
+.Xc
.D1 (alias: Ic refresh )
Refresh the current client if bound to a key, or a single client if one is given
with
.Fl t .
+If
+.Fl S
+is specified, only update the client's status bar.
.It Xo Ic rename-session
.Op Fl t Ar target-session
.Ar new-name
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users