diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-07-01 15:23:01 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-07-01 15:23:01 +0000 |
commit | ad29258c8c2785796d3149c6c230e55d9debc82b (patch) | |
tree | 83b8c7e4028779c51b09f57899dc4c83807305b2 /Src | |
parent | 47347fc7d7decb08155abbeebdbeed4fc7ace6d9 (diff) | |
download | zsh-ad29258c8c2785796d3149c6c230e55d9debc82b.tar.gz zsh-ad29258c8c2785796d3149c6c230e55d9debc82b.tar.xz zsh-ad29258c8c2785796d3149c6c230e55d9debc82b.zip |
29530: ${...?...} shouldn't cause an error with NO_EXEC option
Diffstat (limited to 'Src')
-rw-r--r-- | Src/subst.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Src/subst.c b/Src/subst.c index e8a181129..1b0097001 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -2715,19 +2715,21 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) case '?': case Quest: if (vunset) { - *idend = '\0'; - zerr("%s: %s", idbeg, *s ? s : "parameter not set"); - if (!interact) { - if (mypid == getpid()) { - /* - * paranoia: don't check for jobs, but there shouldn't - * be any if not interactive. - */ - stopmsg = 1; - zexit(1, 0); - } else - _exit(1); - } + if (isset(EXECOPT)) { + *idend = '\0'; + zerr("%s: %s", idbeg, *s ? s : "parameter not set"); + if (!interact) { + if (mypid == getpid()) { + /* + * paranoia: don't check for jobs, but there + * shouldn't be any if not interactive. + */ + stopmsg = 1; + zexit(1, 0); + } else + _exit(1); + } + } return NULL; } break; |