diff options
author | Peter Stephenson <pws@zsh.org> | 2015-01-06 17:05:17 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-01-08 12:24:00 +0000 |
commit | c0d01a6fe0c67911650730cf13a2b9a0db16e59b (patch) | |
tree | 617d685ec8fabe09e1b83874d961436b86b16259 /Src/init.c | |
parent | 93846edb0d5d606e167f929532608eaea273c23f (diff) | |
download | zsh-c0d01a6fe0c67911650730cf13a2b9a0db16e59b.tar.gz zsh-c0d01a6fe0c67911650730cf13a2b9a0db16e59b.tar.xz zsh-c0d01a6fe0c67911650730cf13a2b9a0db16e59b.zip |
Fix command substitutions to parse contents as they are read in.
Do this by refactoring misnamed lexsave()/lexrestore() to allow continuity of history and input. Add test.
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c index 305908724..080fc8561 100644 --- a/Src/init.c +++ b/Src/init.c @@ -142,7 +142,8 @@ loop(int toplevel, int justonce) use_exit_printed = 0; intr(); /* interrupts on */ lexinit(); /* initialize lexical state */ - if (!(prog = parse_event())) { /* if we couldn't parse a list */ + if (!(prog = parse_event(ENDINPUT))) { + /* if we couldn't parse a list */ hend(NULL); if ((tok == ENDINPUT && !errflag) || (tok == LEXERR && (!isset(SHINSTDIN) || !toplevel)) || |