mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-26 16:40:29 +01:00
29530: ${...?...} shouldn't cause an error with NO_EXEC option
This commit is contained in:
parent
47347fc7d7
commit
ad29258c8c
3 changed files with 25 additions and 14 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2011-07-01 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 29530: Src/subst.c, Test/E01options.ztst: ${..?..} shouldn't
|
||||||
|
cause an error with NO_EXEC option.
|
||||||
|
|
||||||
2011-07-01 Frank Terbeck <ft@bewatermyfriend.org>
|
2011-07-01 Frank Terbeck <ft@bewatermyfriend.org>
|
||||||
|
|
||||||
* 29518: Completion/Unix/Command/_git: Fall back to file
|
* 29518: Completion/Unix/Command/_git: Fall back to file
|
||||||
|
|
@ -15077,5 +15082,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.5389 $
|
* $Revision: 1.5390 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
||||||
28
Src/subst.c
28
Src/subst.c
|
|
@ -2715,19 +2715,21 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
|
||||||
case '?':
|
case '?':
|
||||||
case Quest:
|
case Quest:
|
||||||
if (vunset) {
|
if (vunset) {
|
||||||
*idend = '\0';
|
if (isset(EXECOPT)) {
|
||||||
zerr("%s: %s", idbeg, *s ? s : "parameter not set");
|
*idend = '\0';
|
||||||
if (!interact) {
|
zerr("%s: %s", idbeg, *s ? s : "parameter not set");
|
||||||
if (mypid == getpid()) {
|
if (!interact) {
|
||||||
/*
|
if (mypid == getpid()) {
|
||||||
* paranoia: don't check for jobs, but there shouldn't
|
/*
|
||||||
* be any if not interactive.
|
* paranoia: don't check for jobs, but there
|
||||||
*/
|
* shouldn't be any if not interactive.
|
||||||
stopmsg = 1;
|
*/
|
||||||
zexit(1, 0);
|
stopmsg = 1;
|
||||||
} else
|
zexit(1, 0);
|
||||||
_exit(1);
|
} else
|
||||||
}
|
_exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -353,6 +353,10 @@
|
||||||
echo *NonExistentFile*)
|
echo *NonExistentFile*)
|
||||||
0:NO_EXEC option should not do globbing
|
0:NO_EXEC option should not do globbing
|
||||||
|
|
||||||
|
(setopt noexec
|
||||||
|
echo ${unset_var?Not an error})
|
||||||
|
0:NO_EXEC should not test for unset variables
|
||||||
|
|
||||||
setopt NO_eval_lineno
|
setopt NO_eval_lineno
|
||||||
eval 'print $LINENO'
|
eval 'print $LINENO'
|
||||||
setopt eval_lineno
|
setopt eval_lineno
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue