Trim "s from process names; also fix a default format in man page.

pull/2413/head
nicm 2020-10-05 11:04:40 +00:00
parent 1479e32e1a
commit 8d9ea1b97c
2 changed files with 6 additions and 2 deletions

View File

@ -107,7 +107,7 @@ check_window_name(struct window *w)
char *
default_window_name(struct window *w)
{
char *cmd, *s;
char *cmd, *s;
cmd = cmd_stringify_argv(w->active->argc, w->active->argv);
if (cmd != NULL && *cmd != '\0')
@ -142,6 +142,10 @@ parse_window_name(const char *in)
char *copy, *name, *ptr;
name = copy = xstrdup(in);
if (*name == '"')
name++;
name[strcspn (name, "\"")] = '\0';
if (strncmp(name, "exec ", (sizeof "exec ") - 1) == 0)
name = name + (sizeof "exec ") - 1;

2
tmux.1
View File

@ -1858,7 +1858,7 @@ The
.Fl P
option prints information about the new window after it has been created.
By default, it uses the format
.Ql #{session_name}:#{window_index}
.Ql #{session_name}:#{window_index}.#{pane_index}
but a different format may be specified with
.Fl F .
.It Xo Ic capture-pane