diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-10 19:37:35 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-10 19:37:35 +0000 |
commit | 4d711648263372e06928d1c495efb220c7b804d3 (patch) | |
tree | ba1fd7a3ce506332abad9d3e4101fd03b5e69b9d /cmd-respawn-window.c | |
parent | 88ab74ac20ad96771a9f06667da666bf85cd3f23 (diff) |
Pick up cwd from environment,.
Diffstat (limited to 'cmd-respawn-window.c')
-rw-r--r-- | cmd-respawn-window.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd-respawn-window.c b/cmd-respawn-window.c index 37040715..20002c3e 100644 --- a/cmd-respawn-window.c +++ b/cmd-respawn-window.c @@ -1,4 +1,4 @@ -/* $Id: cmd-respawn-window.c,v 1.5 2008-09-10 19:15:04 nicm Exp $ */ +/* $Id: cmd-respawn-window.c,v 1.6 2009-01-10 19:37:35 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -47,7 +47,9 @@ cmd_respawn_window_exec(struct cmd *self, struct cmd_ctx *ctx) struct cmd_target_data *data = self->data; struct winlink *wl; struct session *s; - const char *env[] = { NULL /* TMUX= */, "TERM=screen", NULL }; + const char *env[] = { + NULL /* TMUX= */, "TERM=screen", NULL + }; char buf[256]; u_int i; @@ -64,7 +66,7 @@ cmd_respawn_window_exec(struct cmd *self, struct cmd_ctx *ctx) xsnprintf(buf, sizeof buf, "TMUX=%ld,%u", (long) getpid(), i); env[0] = buf; - if (window_spawn(wl->window, data->arg, env) != 0) { + if (window_spawn(wl->window, data->arg, wl->window->cwd, env) != 0) { ctx->error(ctx, "respawn failed: %s:%d", s->name, wl->idx); return; } |