diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Src/hist.c | 14 |
2 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 0cbb540e9..a418352fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-10 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 28332: Src/hist.c: HIST_LEX_WORDS didn't handled + backslash-newline line continuation properly. Come to think of + it, neither does the alternative. + 2010-10-08 Peter Stephenson <pws@csr.com> * Ben: 28330: Completion/X/Command/_acroread: add @@ -13722,5 +13728,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5100 $ +* $Revision: 1.5101 $ ***************************************************** 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; /* |