Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv8116
Modified Files:
cmd-pipe-pane.c tmux.1
Log Message:
Sync OpenBSD patchset 715:
Support the status_replace # replacement sequences in the pipe-pane
command, thanks to Andrea Barisani.
Index: cmd-pipe-pane.c
===================================================================
RCS file: /cvsroot/tmux/tmux/cmd-pipe-pane.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cmd-pipe-pane.c 14 May 2010 14:30:01 -0000 1.11
+++ cmd-pipe-pane.c 6 Jun 2010 00:28:00 -0000 1.12
@@ -22,6 +22,7 @@
#include <errno.h>
#include <fcntl.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include "tmux.h"
@@ -49,9 +50,14 @@
cmd_pipe_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_target_data *data = self->data;
+ struct client *c;
struct window_pane *wp;
+ char *command;
int old_fd, pipe_fd[2], null_fd, mode;
+ if ((c = cmd_find_client(ctx, data->target)) == NULL)
+ return (-1);
+
if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
@@ -105,7 +111,8 @@
if (null_fd != STDOUT_FILENO && null_fd != STDERR_FILENO)
close(null_fd);
- execl(_PATH_BSHELL, "sh", "-c", data->arg, (char *) NULL);
+ command = status_replace(c, NULL, data->arg, time(NULL), 0);
+ execl(_PATH_BSHELL, "sh", "-c", command, (char *) NULL);
_exit(1);
default:
/* Parent process. */
Index: tmux.1
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.1,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -d -r1.255 -r1.256
--- tmux.1 6 Jun 2010 00:23:44 -0000 1.255
+++ tmux.1 6 Jun 2010 00:28:00 -0000 1.256
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 31 2010 $
+.Dd $Mdocdate: June 5 2010 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -1124,6 +1124,11 @@
closed before
.Ar shell-command
is executed.
+The
+.Ar shell-command
+string may contain the special character sequences supported by the
+.Ic status-left
+command.
If no
.Ar shell-command
is given, the current pipe (if any) is closed.
@@ -1133,7 +1138,7 @@
option only opens a new pipe if no previous pipe exists, allowing a pipe to
be toggled with a single key, for example:
.Bd -literal -offset indent
-bind-key C-p pipe-pane -o 'cat >>~/output'
+bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'
.Ed
.It Xo Ic previous-window
.Op Fl a
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs