summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg.c4
-rw-r--r--tmux.13
2 files changed, 5 insertions, 2 deletions
diff --git a/cfg.c b/cfg.c
index d49bfa61..22a50d22 100644
--- a/cfg.c
+++ b/cfg.c
@@ -109,7 +109,9 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
len = strlen(line);
if (len > 0 && line[len - 1] == '\\') {
line[len - 1] = '\0';
- continue;
+ /* Ignore escaped backslash at EOL. */
+ if (len > 1 && line[len - 2] != '\\')
+ continue;
}
buf = line;
line = NULL;
diff --git a/tmux.1 b/tmux.1
index 989bb0ea..96742378 100644
--- a/tmux.1
+++ b/tmux.1
@@ -493,7 +493,8 @@ Multiple commands may be specified together as part of a
.Em command sequence .
Each command should be separated by spaces and a semicolon;
commands are executed sequentially from left to right and
-lines ending with a backslash continue on to the next line.
+lines ending with a backslash continue on to the next line,
+except when escaped by another backslash.
A literal semicolon may be included by escaping it with a backslash (for
example, when specifying a command sequence to
.Ic bind-key ) .