assert(f);
+ if (!shall_set_terminal_title())
+ return;
+
(void) gethostname_strict(&hn);
if (emoji_enabled())
} else if (!isempty(arg_background))
(void) pty_forward_set_background_color(forward, arg_background);
- if (shall_set_terminal_title())
- set_window_title(forward);
+ set_window_title(forward);
break;
default:
static void set_window_title(PTYForward *f) {
_cleanup_free_ char *hn = NULL, *cl = NULL, *dot = NULL;
+
assert(f);
+ if (!shall_set_terminal_title())
+ return;
+
if (!arg_host)
(void) gethostname_strict(&hn);
if (!isempty(arg_background))
(void) pty_forward_set_background_color(c.forward, arg_background);
- if (shall_set_terminal_title())
- set_window_title(c.forward);
+ set_window_title(c.forward);
}
path = unit_dbus_path_from_name(service);
assert(f);
+ if (!shall_set_terminal_title())
+ return;
+
(void) gethostname_strict(&hn);
if (emoji_enabled())
} else if (!isempty(arg_background))
(void) pty_forward_set_background_color(forward, arg_background);
- if (shall_set_terminal_title())
- set_window_title(forward);
+ set_window_title(forward);
}
r = sd_event_loop(event);