summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-04-06 10:26:57 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-04-06 10:26:57 -0700
commitd4f50f2d185247b1e7e0fc7bb92d54df37558d3e (patch)
tree6d2c2b01040aff5fe59544c211f124049d3e22fb
parent1fa68938dcd3cdd5efdac2799eca809259e49736 (diff)
downloadzsh-d4f50f2d185247b1e7e0fc7bb92d54df37558d3e.tar.gz
zsh-d4f50f2d185247b1e7e0fc7bb92d54df37558d3e.zip
34851: fix thinko from 34093 that short-circuited some "whence -m" searches
-rw-r--r--ChangeLog5
-rw-r--r--Src/builtin.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f570d44e3..1cb94c46c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-06 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 34851: Src/builtin.c: fix thinko from 34093 that short-circuited
+ some "whence -m" searches
+
2015-04-03 Barton E. Schaefer <schaefer@zsh.org>
* 34837: Src/glob.c: avoid loss of original file path when applying
diff --git a/Src/builtin.c b/Src/builtin.c
index 614b17d7e..de0101405 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3236,21 +3236,23 @@ bin_whence(char *nam, char **argv, Options ops, int func)
/* -p option is for path search only. *
* We're not using it, so search for ... */
- informed = /* logical OR of what follows */
-
/* aliases ... */
+ informed +=
scanmatchtable(aliastab, pprog, 1, 0, DISABLED,
- aliastab->printnode, printflags) ||
+ aliastab->printnode, printflags);
/* and reserved words ... */
+ informed +=
scanmatchtable(reswdtab, pprog, 1, 0, DISABLED,
- reswdtab->printnode, printflags) ||
+ reswdtab->printnode, printflags);
/* and shell functions... */
+ informed +=
scanmatchtable(shfunctab, pprog, 1, 0, DISABLED,
- shfunctab->printnode, printflags) ||
+ shfunctab->printnode, printflags);
/* and builtins. */
+ informed +=
scanmatchtable(builtintab, pprog, 1, 0, DISABLED,
builtintab->printnode, printflags);
}