summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2020-10-05 11:04:40 +0000
committernicm <nicm>2020-10-05 11:04:40 +0000
commit8d9ea1b97ca1f70191808df03f9fbe9f93912773 (patch)
tree109e1ae9b844f3d305cc761c83f521474ae478c9
parent1479e32e1af82826dbc5a323e22f1a96eb0a692b (diff)
Trim "s from process names; also fix a default format in man page.
-rw-r--r--names.c6
-rw-r--r--tmux.12
2 files changed, 6 insertions, 2 deletions
diff --git a/names.c b/names.c
index 07c689d1..f437b53e 100644
--- a/names.c
+++ b/names.c
@@ -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;
diff --git a/tmux.1 b/tmux.1
index c2fecd9d..a39237d5 100644
--- a/tmux.1
+++ b/tmux.1
@@ -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