diff options
author | Thomas <thomas@xteddy.org> | 2013-03-25 16:30:37 +0000 |
---|---|---|
committer | Thomas <thomas@xteddy.org> | 2013-03-25 16:30:37 +0000 |
commit | 00af2df1027301a31531321c12eae6ff32989a3a (patch) | |
tree | ff4fc1452186d0f878c4c77475e9590b1ff1020e /cmd-run-shell.c | |
parent | be390c19913a84be7114ce4188006c8ac26b6345 (diff) | |
parent | 972da2d498d6e410fd97c55fb422af7caf464622 (diff) | |
download | rtmux-00af2df1027301a31531321c12eae6ff32989a3a.tar.gz rtmux-00af2df1027301a31531321c12eae6ff32989a3a.tar.bz2 rtmux-00af2df1027301a31531321c12eae6ff32989a3a.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-run-shell.c')
-rw-r--r-- | cmd-run-shell.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c index 4df21ff1..7c7d333c 100644 --- a/cmd-run-shell.c +++ b/cmd-run-shell.c @@ -77,6 +77,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq) struct args *args = self->args; struct cmd_run_shell_data *cdata; char *shellcmd; + struct client *c; struct session *s = NULL; struct winlink *wl = NULL; struct window_pane *wp = NULL; @@ -84,6 +85,14 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq) if (args_has(args, 't')) wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp); + else { + c = cmd_find_client(cmdq, NULL, 1); + if (c != NULL && c->session != NULL) { + s = c->session; + wl = s->curw; + wp = wl->window->active; + } + } ft = format_create(); if (s != NULL) |