Add a way to mark environment variables as "hidden" so they can be used

by tmux but are not passed into the environment of new panes.
This commit is contained in:
nicm
2020-03-31 17:14:40 +00:00
parent e6cddcf752
commit cc8b41f294
13 changed files with 98 additions and 33 deletions

4
tmux.c
View File

@ -332,9 +332,9 @@ main(int argc, char **argv)
global_environ = environ_create();
for (var = environ; *var != NULL; var++)
environ_put(global_environ, *var);
environ_put(global_environ, *var, 0);
if ((cwd = find_cwd()) != NULL)
environ_set(global_environ, "PWD", "%s", cwd);
environ_set(global_environ, "PWD", 0, "%s", cwd);
global_options = options_create(NULL);
global_s_options = options_create(NULL);