diff options
author | 2019-04-28 20:05:50 +0000 | |
---|---|---|
committer | 2019-04-28 20:05:50 +0000 | |
commit | d0772b58724ed55a3cf536d835c40b0be4672eb7 (patch) | |
tree | 4be7102055e890cc6477cf05d1d5155b34d0188f /usr.bin/tmux/spawn.c | |
parent | Fix reading route entries via kvm(3). (diff) | |
download | wireguard-openbsd-d0772b58724ed55a3cf536d835c40b0be4672eb7.tar.xz wireguard-openbsd-d0772b58724ed55a3cf536d835c40b0be4672eb7.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 'usr.bin/tmux/spawn.c')
-rw-r--r-- | usr.bin/tmux/spawn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c index 5109c432311..0bdf061f976 100644 --- a/usr.bin/tmux/spawn.c +++ b/usr.bin/tmux/spawn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spawn.c,v 1.1 2019/04/17 14:37:48 nicm Exp $ */ +/* $OpenBSD: spawn.c,v 1.2 2019/04/28 20:05:50 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); /* |