aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-06-14 15:51:09 +0100
committerThomas Adam <thomas@xteddy.org>2019-06-14 15:51:09 +0100
commit5e9757b30b8de13028149caa2683a7d76f231790 (patch)
tree5df34efc0213aa839e5ba6ddefa1193309cff383 /tmux.1
parent4bbf941436765201825c8d675f45b0cb70eb19d3 (diff)
parentd1d3bbb458b50ec455d65774d5c6669546b3b4ca (diff)
downloadrtmux-5e9757b30b8de13028149caa2683a7d76f231790.tar.gz
rtmux-5e9757b30b8de13028149caa2683a7d76f231790.tar.bz2
rtmux-5e9757b30b8de13028149caa2683a7d76f231790.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.150
1 files changed, 39 insertions, 11 deletions
diff --git a/tmux.1 b/tmux.1
index fe27105d..9188ba47 100644
--- a/tmux.1
+++ b/tmux.1
@@ -587,9 +587,9 @@ or
.Ql %endif .
For example:
.Bd -literal -offset indent
-%if #{==:#{host},myhost}
+%if "#{==:#{host},myhost}"
set -g status-style bg=red
-%elif #{==:#{host},myotherhost}
+%elif "#{==:#{host},myotherhost}"
set -g status-style bg=green
%else
set -g status-style bg=blue
@@ -4017,25 +4017,45 @@ if running on
.Ql myhost ,
otherwise by
.Ql 0 .
-An
-.Ql m
-specifies an
-.Xr fnmatch 3
-comparison where the first argument is the pattern and the second the string to
-compare, for example
-.Ql #{m:*foo*,#{host}} .
.Ql ||
and
.Ql &&
evaluate to true if either or both of two comma-separated alternatives are
true, for example
.Ql #{||:#{pane_in_mode},#{alternate_on}} .
+.Pp
+An
+.Ql m
+specifies an
+.Xr fnmatch 3
+or regular expression comparison.
+The first argument is the pattern and the second the string to compare.
+An optional third argument specifies flags:
+.Ql r
+means the pattern is a regular expression instead of the default
+.Xr fnmatch 3
+pattern, and
+.Ql i
+means to ignore case.
+For example:
+.Ql #{m:*foo*,#{host}}
+or
+.Ql #{m/ri:^A,MYVAR} .
A
.Ql C
performs a search for an
.Xr fnmatch 3
-pattern in the pane content and evaluates to zero if not found, or a line
-number if found.
+pattern or regular expression in the pane content and evaluates to zero if not
+found, or a line number if found.
+Like
+.Ql m ,
+an
+.Ql r
+flag means search for a regular expression and
+.Ql i
+ignores case.
+For example:
+.Ql #{C/r:^Start}
.Pp
A limit may be placed on the length of the resultant string by prefixing it
by an
@@ -4108,6 +4128,14 @@ will substitute
with
.Ql bar
throughout.
+The first argument may be an extended regular expression and a final argument may be
+.Ql i
+to ignore case, for example
+.Ql s/a(.)/\e1x/i:
+would change
+.Ql abABab
+into
+.Ql bxBxbx .
.Pp
In addition, the first line of a shell command's output may be inserted using
.Ql #() .