From 1286c56188502e217c49f712faba66ee4178f964 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 24 Nov 2013 11:29:09 +0000 Subject: [PATCH] Replace ## by # in format. --- format.c | 7 +++++++ tmux.1 | 3 +++ 2 files changed, 10 insertions(+) diff --git a/format.c b/format.c index bfc40906..bcb897d6 100644 --- a/format.c +++ b/format.c @@ -321,6 +321,13 @@ format_expand(struct format_tree *ft, const char *fmt) break; fmt += n + 1; continue; + case '#': + while (len - off < 2) { + buf = xrealloc(buf, 2, len); + len *= 2; + } + buf[off++] = '#'; + continue; default: s = NULL; if (ch >= 'A' && ch <= 'Z') diff --git a/tmux.1 b/tmux.1 index e815fc4e..a2404b4f 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3011,6 +3011,9 @@ for example .Ql #{session_name} . Some variables also have an shorter alias such as .Ql #S . +.Ql ## +is replaced by a single +.Ql # . Conditionals are also accepted by prefixing with .Ql \&? and separating two alternatives with a comma;