diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-10 17:26:38 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-10 17:26:38 +0000 |
commit | 6fea7f0d3c4d30ddc78db9e798a3ef9427abbc6f (patch) | |
tree | 9ed30cb232a3f538be263c1ce8443371545153c6 /Src/hist.c | |
parent | d234059b1c6493e5eefb6c28aa2b8a021d894d51 (diff) | |
download | zsh-6fea7f0d3c4d30ddc78db9e798a3ef9427abbc6f.tar.gz zsh-6fea7f0d3c4d30ddc78db9e798a3ef9427abbc6f.tar.xz zsh-6fea7f0d3c4d30ddc78db9e798a3ef9427abbc6f.zip |
28332: backslash-newline with HIST_LEX_WORDS
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Src/hist.c b/Src/hist.c index 1c626fd76..0eeb98fb0 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2358,8 +2358,18 @@ readhistfile(char *fn, int err, int readflags) incnode(wordnode)) { char *word = getdata(wordnode); - while (inblank(*pt)) - pt++; + for (;;) { + /* + * Not really an oddity: "\\\n" is + * removed from input as if whitespace. + */ + if (inblank(*pt)) + pt++; + else if (strpfx("\\\n", pt)) + pt += 2; + else + break; + } if (!strpfx(word, pt)) { int bad = 0; /* |