From c4b0da5513ee4c9692f0980408b0da2ee7e3a553 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 28 Apr 2019 20:05:50 +0000 Subject: 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. --- spawn.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spawn.c') 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); /* -- cgit