diff options
author | nicm <nicm> | 2021-10-11 10:55:30 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-10-11 10:55:30 +0000 |
commit | 759efe1b3327a7244c03ecc7b90e0e3c49712d06 (patch) | |
tree | 58e4302cb00b591f010c38a6871b1e9a779da5a3 /job.c | |
parent | 7800a431ea63f3be4f0763df3f3a2fae44aeac58 (diff) |
Add -e flag to set environment for popup, from Alexis Hildebrandt in
GitHub issue 2924.
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -71,7 +71,7 @@ static LIST_HEAD(joblist, job) all_jobs = LIST_HEAD_INITIALIZER(all_jobs); /* Start a job running. */ struct job * -job_run(const char *cmd, int argc, char **argv, struct session *s, +job_run(const char *cmd, int argc, char **argv, struct environ *e, struct session *s, const char *cwd, job_update_cb updatecb, job_complete_cb completecb, job_free_cb freecb, void *data, int flags, int sx, int sy) { @@ -89,6 +89,9 @@ job_run(const char *cmd, int argc, char **argv, struct session *s, * if-shell to decide on default-terminal based on outside TERM. */ env = environ_for_session(s, !cfg_finished); + if (e != NULL) { + environ_copy(e, env); + } sigfillset(&set); sigprocmask(SIG_BLOCK, &set, &oldset); |