From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6633 invoked by alias); 6 Apr 2015 16:33:50 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34851 Received: (qmail 19028 invoked from network); 6 Apr 2015 16:33:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:to:subject:mime-version :content-type; bh=iEDQBtleH2lMxVkdONh352WKQi79fZsgOCklLwtuX+E=; b=Ngq7PcEApMvc3RCjTfP8pifaedUIy4PliqTZGyQRPtBlsBE3Kdf4gj8C3Eo1DSplsz fUgVphwYhjdWArviSZw2J04qwGgI3XIyStV5s3SArBhazfs7ywlsTSFw3bpoEWgCX4Qc IBiNjJPJZTuBg+AZ7uAF2KtYwSc4E8s/BvsCmaQyUT44tWsV5QKHKRH/HLb1XbEurVhh fsOmQbkDrmhZHjFGWsg0sqCtpxRtsOLv5ko8kwyOtQrXydmaSJk5GQYxrLZoDefuGgOH +9sJKhnKMInGmHssT5waKUtVr0czZG5/Wb6YhyxpQxHd1O0q7zZ7tiXDaZ85q1P1pv6b xT4w== X-Gm-Message-State: ALoCoQmBQPYqUPqRaFBZDvR8/k5aoMGd7C7ATwiHQdVgAqNmt3RjEppk3mWBRShyRIy9gOgWCrHW X-Received: by 10.60.33.106 with SMTP id q10mr19196144oei.67.1428338013617; Mon, 06 Apr 2015 09:33:33 -0700 (PDT) From: Bart Schaefer Message-Id: <150406093330.ZM20436@torch.brasslantern.com> Date: Mon, 6 Apr 2015 09:33:30 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: PATCH: "whence" and patterns, yet again MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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); }