mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
If multiple arguments are given to new-session, new-window,
split-window, respawn-window or respawn-pane, pass them directly to execvp() to help avoid quoting problems. One argument still goes to "sh -c" like before. Requested by many over the years. Patch from J Raynor.
This commit is contained in:
12
names.c
12
names.c
@ -68,9 +68,15 @@ window_name_callback(unused int fd, unused short events, void *data)
|
||||
char *
|
||||
default_window_name(struct window *w)
|
||||
{
|
||||
if (w->active->cmd != NULL && *w->active->cmd != '\0')
|
||||
return (parse_window_name(w->active->cmd));
|
||||
return (parse_window_name(w->active->shell));
|
||||
char *cmd, *s;
|
||||
|
||||
cmd = cmd_stringify_argv(w->active->argc, w->active->argv);
|
||||
if (cmd != NULL && *cmd != '\0')
|
||||
s = parse_window_name(cmd);
|
||||
else
|
||||
s = parse_window_name(w->active->shell);
|
||||
free(cmd);
|
||||
return (s);
|
||||
}
|
||||
|
||||
char *
|
||||
|
Reference in New Issue
Block a user