diff options
author | 2020-10-05 11:04:40 +0000 | |
---|---|---|
committer | 2020-10-05 11:04:40 +0000 | |
commit | 3fa4d618d5e93619bd8ff09fb34b9c05e9d3dc3c (patch) | |
tree | 2655404f5198a48f09ad1bcdb06448f45fb02a97 | |
parent | Tidy the resize code, merge some common bits and add some comments. From (diff) | |
download | wireguard-openbsd-3fa4d618d5e93619bd8ff09fb34b9c05e9d3dc3c.tar.xz wireguard-openbsd-3fa4d618d5e93619bd8ff09fb34b9c05e9d3dc3c.zip |
Trim "s from process names; also fix a default format in man page.
-rw-r--r-- | usr.bin/tmux/names.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c index 60b0f314a1d..db826680878 100644 --- a/usr.bin/tmux/names.c +++ b/usr.bin/tmux/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.42 2020/05/16 15:01:31 nicm Exp $ */ +/* $OpenBSD: names.c,v 1.43 2020/10/05 11:04:40 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 9b19d24dfeb..8fe7a02e388 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.797 2020/10/05 09:53:01 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.798 2020/10/05 11:04:40 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> .\" @@ -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 |