diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-05-17 21:21:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-05-17 21:21:31 +0000 |
commit | ac7e2f13e999c1f24b58f7db868c7faeeb0a3c0e (patch) | |
tree | 1ba37fb761a1b58f90b5214534fb90451c521361 | |
parent | 50cefec497946f7e19213470880bb5fbe2b8d7f1 (diff) |
Ignore line continuation when escaped as \\, from Simon Nicolussi.
-rw-r--r-- | cfg.c | 4 | ||||
-rw-r--r-- | tmux.1 | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -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; @@ -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 ) . |