aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
authornicm <nicm>2020-06-04 07:12:05 +0000
committernicm <nicm>2020-06-04 07:12:05 +0000
commitb3782d2dc8f872c43fcf53b9436c4e881d3f1e2d (patch)
treef7c75fcbdc0ce56e6f55cce00480a49a3dd02f84 /tmux.1
parent3f6af4156f451cfbee867babe74cc6675eb3f947 (diff)
downloadrtmux-b3782d2dc8f872c43fcf53b9436c4e881d3f1e2d.tar.gz
rtmux-b3782d2dc8f872c43fcf53b9436c4e881d3f1e2d.tar.bz2
rtmux-b3782d2dc8f872c43fcf53b9436c4e881d3f1e2d.zip
Instead of using a custom parse function to process {}, treat it as a
set of statements and parse with yacc, then convert back to a string as the last step. This means the rules are consistent inside and outside {}, %if and friends work at the right time, and the final result isn't littered with unnecessary newlines.
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.119
1 files changed, 8 insertions, 11 deletions
diff --git a/tmux.1 b/tmux.1
index 2ba3362b..a6c129d3 100644
--- a/tmux.1
+++ b/tmux.1
@@ -552,17 +552,14 @@ is removed) and are not treated as having any special meaning - so for example
variable.
.El
.Pp
-Braces are similar to single quotes in that the text inside is taken literally
-without any replacements but this also includes line continuation.
-Braces can span multiple lines in which case a literal newline is included in the
-string.
-They are designed to avoid the need for additional escaping when passing a group
-of
+Braces are parsed as a configuration file (so conditions such as
+.Ql %if
+are processed) and then converted into a string.
+They are designed to avoid the need for additional escaping when passing a
+group of
.Nm
-or shell commands as an argument (for example to
-.Ic if-shell
-or
-.Ic pipe-pane ) .
+commands as an argument (for example to
+.Ic if-shell ) .
These two examples produce an identical command - note that no escaping is
needed when using {}:
.Bd -literal -offset indent
@@ -570,7 +567,7 @@ if-shell true {
display -p 'brace-dollar-foo: }$foo'
}
-if-shell true "\en display -p 'brace-dollar-foo: }\e$foo'\en"
+if-shell true "display -p 'brace-dollar-foo: }\e$foo'"
.Ed
.Pp
Braces may be enclosed inside braces, for example: