diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2013-06-13 18:38:33 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2013-06-13 18:38:33 +0100 |
commit | fdf2867e5f08809ff3fccc78fb6df13a196e3efc (patch) | |
tree | a52def21ef686d6f4759afc778088a80a659a4cd /Src/exec.c | |
parent | e36e7d9adea7b8eab8f561e180f78b9f8e4eee5c (diff) | |
download | zsh-fdf2867e5f08809ff3fccc78fb6df13a196e3efc.tar.gz zsh-fdf2867e5f08809ff3fccc78fb6df13a196e3efc.tar.xz zsh-fdf2867e5f08809ff3fccc78fb6df13a196e3efc.zip |
31444: Basic code for enable/disable -p
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c index 14c2ba003..75805d3f5 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4627,6 +4627,7 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval) } starttrapscope(); + startpatternscope(); pptab = pparams; if (!(flags & PM_UNDEFINED)) @@ -4674,6 +4675,8 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval) offptr++) opts[*offptr] = 0; } + /* All emulations start with pattern disables clear */ + clearpatterndisables(); } else restore_sticky = 0; @@ -4774,6 +4777,8 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval) scriptname = oldscriptname; oflags = ooflags; + endpatternscope(); /* before restoring old LOCALPATTERNS */ + if (restore_sticky) { /* * If we switched to an emulation environment just for |