aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarlon Richert <marlon.richert@gmail.com>2021-09-06 14:16:18 -0700
committerBart Schaefer <schaefer@ipost.com>2021-09-06 14:16:18 -0700
commita675d058db7587eaf2f95da3e6d14fdacf01a7b0 (patch)
tree19520a7c6506761af948d6c4e91e2d95b923de85
parenta36f4228d38bf70eac0a651a9d89718644bc0248 (diff)
downloadzsh-a675d058db7587eaf2f95da3e6d14fdacf01a7b0.tar.gz
zsh-a675d058db7587eaf2f95da3e6d14fdacf01a7b0.tar.xz
zsh-a675d058db7587eaf2f95da3e6d14fdacf01a7b0.zip
49378: skip check for collision of aliases and functions when NO_EXEC
-rw-r--r--ChangeLog3
-rw-r--r--Src/parse.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 885b7ed91..2a6b68368 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2021-09-06 Bart Schaefer <schaefer@zsh.org>
+ * Marlon Richert: 49378: Src/parse.c: skip check for collision
+ of aliases and functions when NO_EXEC
+
* 49282: set $0 correctly when calling functions from hooks
* 49266: fix segfault on metacharacters in long job texts
diff --git a/Src/parse.c b/Src/parse.c
index be26112a5..10d193ba1 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2052,7 +2052,7 @@ par_simple(int *cmplx, int nr)
/* Error if preceding assignments */
if (assignments || postassigns)
YYERROR(oecused);
- if (hasalias && !isset(ALIASFUNCDEF) && argc &&
+ if (isset(EXECOPT) && hasalias && !isset(ALIASFUNCDEF) && argc &&
hasalias != input_hasalias()) {
zwarn("defining function based on alias `%s'", hasalias);
YYERROR(oecused);