diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-06-18 09:31:07 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-06-18 09:31:07 +0100 |
commit | 77f582ff137808cc3743ad545f63422cc8e71a71 (patch) | |
tree | 5737aa67c96dcd11d3474989889189732e374900 /cmd-respawn-pane.c | |
parent | f5973b77763e3f8da8e8f6483464f6f4bc2f3981 (diff) | |
parent | 92af7f5901bd944e385e7fdbe8696b2c911ed776 (diff) | |
download | rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.tar.gz rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.tar.bz2 rtmux-77f582ff137808cc3743ad545f63422cc8e71a71.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'cmd-respawn-pane.c')
-rw-r--r-- | cmd-respawn-pane.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cmd-respawn-pane.c b/cmd-respawn-pane.c index 9ac5b0b8..f951685c 100644 --- a/cmd-respawn-pane.c +++ b/cmd-respawn-pane.c @@ -32,7 +32,7 @@ enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_respawn_pane_entry = { "respawn-pane", "respawnp", - "kt:", 0, 1, + "kt:", 0, -1, "[-k] " CMD_TARGET_PANE_USAGE " [command]", 0, NULL, @@ -48,7 +48,7 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) struct window_pane *wp; struct session *s; struct environ env; - const char *cmd, *path; + const char *path; char *cause; u_int idx; struct environ_entry *envent; @@ -74,11 +74,6 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) screen_reinit(&wp->base); input_init(wp); - if (args->argc != 0) - cmd = args->argv[0]; - else - cmd = NULL; - path = NULL; if (cmdq->client != NULL && cmdq->client->session == NULL) envent = environ_find(&cmdq->client->environ, "PATH"); @@ -87,8 +82,8 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) if (envent != NULL) path = envent->value; - if (window_pane_spawn(wp, cmd, path, NULL, -1, &env, s->tio, - &cause) != 0) { + if (window_pane_spawn(wp, args->argc, args->argv, path, NULL, -1, &env, + s->tio, &cause) != 0) { cmdq_error(cmdq, "respawn pane failed: %s", cause); free(cause); environ_free(&env); |