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.
This commit is contained in:
nicm
2019-04-28 20:05:50 +00:00
parent dfb7bb6830
commit c4b0da5513
8 changed files with 192 additions and 63 deletions

View File

@ -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);
/*