Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: "whence" and patterns, yet again
- X-seq: zsh-workers 34851
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: "whence" and patterns, yet again
- Date: Mon, 6 Apr 2015 09:33:30 -0700
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Using logical-or caused premature short-circuit of some searches. Thinko.
diff --git a/Src/builtin.c b/Src/builtin.c
index 614b17d..de01014 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);
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author