summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-11-24 11:29:10 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-11-24 11:29:10 +0000
commitf54cab43e0f24a1dd2e839ed7d6a2a988754d5fc (patch)
tree771d2f35f4b3970bcca44af87f56ff3fefd981b5 /usr.bin
parent9fa5a397426b739e9289fb6fde63a7b1d505db1c (diff)
Replace ## by # in format.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/format.c9
-rw-r--r--usr.bin/tmux/tmux.17
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index 3b770e7aa93..5280c9344d6 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.39 2013/10/11 08:03:43 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.40 2013/11/24 11:29:09 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 12ee5342bc7..ba3f6ab80ff 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.375 2013/10/23 11:31:03 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.376 2013/11/24 11:29:09 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 23 2013 $
+.Dd $Mdocdate: November 24 2013 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -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;