Hi Nicholas,

On Tue, Sep 27, 2011 at 10:50:39PM +0100, Nicholas Marriott wrote:
> 
> Can you make this a flag (-S or -s or whatever) to refresh-client
> instead of a new command?

Of course, this is much better. Updated patch (against SVN trunk)
is attached.

Thanks,
Marco
# HG changeset patch
# User Marco Beck <mb...@eaddrinuse.net>
# Date 1317224819 -7200
# Node ID d26aac2352312550f863454f1ab3c7814dd0ffa7
# Parent  2a041ad30bca5f26d6ca8c056957e0ce364a8305
Add option '-S' to refresh-client to additionally update
the 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,6 +45,11 @@
 	if ((c = cmd_find_client(ctx, args_get(args, 't'))) == NULL)
 		return (-1);
 
+	if (args_has(args, 'S')) {
+		status_update_jobs(c);
+		c->flags |= CLIENT_STATUS;
+	}
+
 	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, also update the 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

Reply via email to