aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-09 22:01:12 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-09 22:01:12 +0000
commit2c862b04af15d125b6fb82f1db1ec0a59b1ffff2 (patch)
tree778c41073382825c9a352f8ba654e0a9181bef69 /tmux.1
parent36619607ba79f15a793d9c04d9cb98a98562dc30 (diff)
parentd2d984647ee0149c6fc9ec4bcd8d109679208a27 (diff)
downloadrtmux-2c862b04af15d125b6fb82f1db1ec0a59b1ffff2.tar.gz
rtmux-2c862b04af15d125b6fb82f1db1ec0a59b1ffff2.tar.bz2
rtmux-2c862b04af15d125b6fb82f1db1ec0a59b1ffff2.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.139
1 files changed, 39 insertions, 0 deletions
diff --git a/tmux.1 b/tmux.1
index 484749ba..3e89893d 100644
--- a/tmux.1
+++ b/tmux.1
@@ -934,6 +934,30 @@ If
is given, no error will be returned if
.Ar path
does not exist.
+.Pp
+Within a configuration file, commands may be made conditional by surrounding
+them with
+.Em %if
+and
+.Em %endif
+lines.
+The argument to
+.Em %if
+is expanded as a format and if it evaluates to false
+.Ns ( Ql 0
+or empty), subsequent lines are ignored until
+.Em %endif .
+For example:
+.Bd -literal -offset indent
+%if #{==:#{host},myhost}
+set -g status-style bg=red
+%endif
+.Ed
+.Pp
+Will change the status line to red if running on
+.Ql myhost .
+.Em %if
+may not be nested.
.It Ic start-server
.D1 (alias: Ic start )
Start the
@@ -3401,6 +3425,21 @@ is enabled, or
.Ql no
if not.
.Pp
+Simple comparisons may be expressed by prefixing two comma-separated
+alternatives by
+.Ql ==
+or
+.Ql !=
+and a colon.
+For example
+.Ql #{==,#{host},myhost}
+will be replaced by
+.Ql 1
+if running on
+.Ql myhost ,
+otherwise by
+.Ql 0.
+.Pp
A limit may be placed on the length of the resultant string by prefixing it
by an
.Ql = ,