aboutsummaryrefslogtreecommitdiff
path: root/spawn.c
diff options
context:
space:
mode:
authornicm <nicm>2019-04-28 20:05:50 +0000
committernicm <nicm>2019-04-28 20:05:50 +0000
commitc4b0da5513ee4c9692f0980408b0da2ee7e3a553 (patch)
tree3bef007901ae51d68f18454f1bbf8a9c2027e11e /spawn.c
parentdfb7bb683057d08303955c49073f4b475bd0e2d6 (diff)
downloadrtmux-c4b0da5513ee4c9692f0980408b0da2ee7e3a553.tar.gz
rtmux-c4b0da5513ee4c9692f0980408b0da2ee7e3a553.tar.bz2
rtmux-c4b0da5513ee4c9692f0980408b0da2ee7e3a553.zip
Support multiple occurances of the same argument. Use this for a new
flag -e to new-window, split-window, respawn-window, respawn-pane to pass environment variables into the newly created process. From Steffen Christgau in GitHub issue 1697.
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spawn.c b/spawn.c
index 0565fee3..8e577ff5 100644
--- a/spawn.c
+++ b/spawn.c
@@ -293,6 +293,8 @@ spawn_pane(struct spawn_context *sc, char **cause)
/* Create an environment for this pane. */
child = environ_for_session(s, 0);
+ if (sc->environ != NULL)
+ environ_copy(sc->environ, child);
environ_set(child, "TMUX_PANE", "%%%u", new_wp->id);
/*