diff options
author | nicm <nicm> | 2016-07-15 09:52:34 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-07-15 09:52:34 +0000 |
commit | 9436a316038d1d1c9bc161d282564ed67e2f8ce2 (patch) | |
tree | 94ce74679bcebc49fb2902c51758e7d94730675a | |
parent | 1718420c48737a3038966611c83f37f3c272901e (diff) | |
download | rtmux-9436a316038d1d1c9bc161d282564ed67e2f8ce2.tar.gz rtmux-9436a316038d1d1c9bc161d282564ed67e2f8ce2.tar.bz2 rtmux-9436a316038d1d1c9bc161d282564ed67e2f8ce2.zip |
Tweak output of environment logging.
-rw-r--r-- | environ.c | 10 | ||||
-rw-r--r-- | tmux.h | 2 | ||||
-rw-r--r-- | window.c | 2 |
3 files changed, 9 insertions, 5 deletions
@@ -206,10 +206,14 @@ environ_push(struct environ *env) /* Log the environment. */ void -environ_log(struct environ *env) +environ_log(struct environ *env, const char *prefix) { struct environ_entry *envent; - RB_FOREACH(envent, environ, env) - log_debug("%s=%s", envent->name, envent->value); + RB_FOREACH(envent, environ, env) { + if (envent->value != NULL && *envent->name != '\0') { + log_debug("%s%s=%s", prefix, envent->name, + envent->value); + } + } } @@ -1693,7 +1693,7 @@ void environ_put(struct environ *, const char *); void environ_unset(struct environ *, const char *); void environ_update(const char *, struct environ *, struct environ *); void environ_push(struct environ *); -void environ_log(struct environ *); +void environ_log(struct environ *, const char *); /* tty.c */ void tty_create_log(void); @@ -842,7 +842,7 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv, log_debug("spawn: %s -- %s", wp->shell, cmd); for (i = 0; i < wp->argc; i++) log_debug("spawn: argv[%d] = %s", i, wp->argv[i]); - environ_log(env); + environ_log(env, "spawn: "); memset(&ws, 0, sizeof ws); ws.ws_col = screen_size_x(&wp->base); |