From 164ba041c9301d8c804a9f76da8ac62a8de286de Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 18 Jun 2015 23:53:56 +0000 Subject: [PATCH 1/3] Remove a stray : and tweak paragraph. --- tmux.1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tmux.1 b/tmux.1 index 033330b7..f0dd569a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -404,14 +404,15 @@ An pattern which is matched against the session name. .El .Pp -If the session name is prefixed with a -.Ql = : , +If the session name is prefixed with an +.Ql = , only an exact match is accepted (so .Ql =mysess will only match exactly .Ql mysess , not .Ql mysession ) . +.Pp If a single session is found, it is used as the target session; multiple matches produce an error. If a session is omitted, the current session is used if available; if no From b43b13faf9ba620c3150bfe459fe6b38e58f6079 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 18 Jun 2015 23:55:24 +0000 Subject: [PATCH 2/3] Use xsnprintf. --- format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/format.c b/format.c index 67bce925..8a52b0e1 100644 --- a/format.c +++ b/format.c @@ -338,7 +338,7 @@ format_find(struct format_tree *ft, const char *key) case OPTIONS_STRING: return (o->str); case OPTIONS_NUMBER: - snprintf(s, sizeof s, "%lld", o->num); + xsnprintf(s, sizeof s, "%lld", o->num); return (s); case OPTIONS_STYLE: return (style_tostring(&o->style)); @@ -679,7 +679,7 @@ format_defaults_session(struct format_tree *ft, struct session *s) RB_FOREACH (wl, winlinks, &s->windows) { if ((wl->flags & WINLINK_ALERTFLAGS) == 0) continue; - snprintf(tmp, sizeof tmp, "%u", wl->idx); + xsnprintf(tmp, sizeof tmp, "%u", wl->idx); if (*alerts != '\0') strlcat(alerts, ",", sizeof alerts); From f557c7d8ca48c79136e4997b2cba0a08ee039257 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 18 Jun 2015 23:56:01 +0000 Subject: [PATCH 3/3] Use the SRCDST define for usage. --- cmd-join-pane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd-join-pane.c b/cmd-join-pane.c index b995b674..cc6432a4 100644 --- a/cmd-join-pane.c +++ b/cmd-join-pane.c @@ -36,7 +36,7 @@ enum cmd_retval join_pane(struct cmd *, struct cmd_q *, int); const struct cmd_entry cmd_join_pane_entry = { "join-pane", "joinp", "bdhvp:l:s:t:", 0, 0, - "[-bdhv] [-p percentage|-l size] [-s src-pane] [-t dst-pane]", + "[-bdhv] [-p percentage|-l size] " CMD_SRCDST_PANE_USAGE, 0, cmd_join_pane_exec }; @@ -44,7 +44,7 @@ const struct cmd_entry cmd_join_pane_entry = { const struct cmd_entry cmd_move_pane_entry = { "move-pane", "movep", "bdhvp:l:s:t:", 0, 0, - "[-bdhv] [-p percentage|-l size] [-s src-pane] [-t dst-pane]", + "[-bdhv] [-p percentage|-l size] " CMD_SRCDST_PANE_USAGE, 0, cmd_join_pane_exec };