aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-03-01 17:54:47 +0000
committerThomas Adam <thomas@xteddy.org>2021-03-01 17:54:47 +0000
commit9d99dad9e8309f86c778918bea011487911f83ce (patch)
tree7b76155beb8b51cf3a9107d742e1dfb8734c60fa
parent9cd45ddad3141370e0dac117388984a3f026c097 (diff)
parent8a4a2153fdec71397fe555073d4d77ee68947fff (diff)
downloadrtmux-9d99dad9e8309f86c778918bea011487911f83ce.tar.gz
rtmux-9d99dad9e8309f86c778918bea011487911f83ce.tar.bz2
rtmux-9d99dad9e8309f86c778918bea011487911f83ce.zip
Merge branch 'obsd-master' into master
-rw-r--r--tmux.163
1 files changed, 63 insertions, 0 deletions
diff --git a/tmux.1 b/tmux.1
index 751dd1bc..0f379df4 100644
--- a/tmux.1
+++ b/tmux.1
@@ -522,6 +522,69 @@ Commands separated by semicolons together form a
- if a command in the sequence encounters an error, no subsequent commands are
executed.
.Pp
+It is recommended that a semicolon used as a command separator should be
+written as an individual token, for example from
+.Xr sh 1 :
+.Bd -literal -offset indent
+$ tmux neww \\; splitw
+.Ed
+.Pp
+Or:
+.Bd -literal -offset indent
+$ tmux neww ';' splitw
+.Ed
+.Pp
+Or from the tmux command prompt:
+.Bd -literal -offset indent
+neww ; splitw
+.Ed
+.Pp
+However, a trailing semicolon is also interpreted as a command separator,
+for example in these
+.Xr sh 1
+commands:
+.Bd -literal -offset indent
+$ tmux neww\\; splitw
+.Ed
+.Pp
+Or:
+.Bd -literal -offset indent
+$ tmux 'neww;' splitw
+.Ed
+.Pp
+As in these examples, when running tmux from the shell extra care must be taken
+to properly quote semicolons:
+.Bl -enum -offset Ds
+.It
+Semicolons that should be interpreted as a command separator
+should be escaped according to the shell conventions.
+For
+.Xr sh 1
+this typically means quoted (such as
+.Ql neww ';' splitw )
+or escaped (such as
+.Ql neww \\\\; splitw ) .
+.It
+Individual semicolons or trailing semicolons that should be interpreted as
+arguments should be escaped twice: once according to the shell conventions and
+a second time for
+.Nm ;
+for example:
+.Bd -literal -offset indent
+$ tmux neww 'foo\\;' bar
+$ tmux neww foo\\\\; bar
+.Ed
+.Pp
+.It
+Semicolons that are not individual tokens or trailing another token should only
+be escaped once according to shell conventions; for example:
+.Bd -literal -offset indent
+$ tmux neww 'foo-;-bar'
+$ tmux neww foo-\\;-bar
+.Ed
+.Pp
+.El
+.Pp
Comments are marked by the unquoted # character - any remaining text after a
comment is ignored until the end of the line.
.Pp