summaryrefslogtreecommitdiffstats
path: root/cmd-respawn-window.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-09-02 01:02:44 +0000
committerTiago Cunha <tcunha@gmx.com>2009-09-02 01:02:44 +0000
commita3a150faf22fe1d8303e8e92aa2a6d92e7e10b5c (patch)
treed1ab94890474f4ecb77b3d482390ad7f61f4033e /cmd-respawn-window.c
parentce5c441f0fddc70c9ac982eb4741d3d0230d51a2 (diff)
Sync OpenBSD patchset 305:
When using tmux as a login shell, there is currently no way to specify a shell to be used as a login shell inside tmux, so add a default-shell session option. This sets the shell invoked as a login shell when the default-command option is empty. The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell or /bin/sh is valid first. Based on a diff from martynas@, changed by me to be a session option rather than a window option.
Diffstat (limited to 'cmd-respawn-window.c')
-rw-r--r--cmd-respawn-window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-respawn-window.c b/cmd-respawn-window.c
index 849d40b7..114fdfd1 100644
--- a/cmd-respawn-window.c
+++ b/cmd-respawn-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-respawn-window.c,v 1.20 2009-08-16 18:59:12 tcunha Exp $ */
+/* $Id: cmd-respawn-window.c,v 1.21 2009-09-02 01:02:44 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -75,7 +75,8 @@ cmd_respawn_window_exec(struct cmd *self, struct cmd_ctx *ctx)
window_destroy_panes(w);
TAILQ_INSERT_HEAD(&w->panes, wp, entry);
window_pane_resize(wp, w->sx, w->sy);
- if (window_pane_spawn(wp, data->arg, NULL, &env, &s->tio, &cause) != 0) {
+ if (window_pane_spawn(
+ wp, data->arg, NULL, NULL, &env, &s->tio, &cause) != 0) {
ctx->error(ctx, "respawn window failed: %s", cause);
xfree(cause);
environ_free(&env);