From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16781 invoked from network); 27 May 2023 05:25:56 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 May 2023 05:25:56 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1685165156; b=fwI562CDivF2EI1/Yfl4CK8qHJBLTWvMEGVW7kx0NAmnqdfEtqMa2GKQqPTPCWYfRx4ZvomGD/ XIc8ctuwfkzEKDAvC6DlgdfFjgh1pJiUWSLqTDhzqfZUpij/OD3GwhMvNHsZeJavqfGPJX6Zts 9+EF8IvfqtAECfxLG6Ky2W1jLPSvA1vaaJVbWkj+f983sphchX8KE+mc3NmQ96rJDY62kJHq4/ lyPSjqxMAHMusWgx0aXpoTWYLZsMD4R+thAcImgmCWIQ4SuSWRfSO4XNharVo5t0zQjpM0FJLF Q73QNOA4yj6kjbVLXLlPQ9rcAvCxQlKZ8cR+M0DMbQa/rw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202305e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202305 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1685165156; bh=H0AxeMR9FzCA+cC/R0nM6mFSoltVdHQHjaGJQQZuCjs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature:DKIM-Signature:DKIM-Signature; b=CjI8Jc3OaGMGldNS/CoyRMLoFbSYZON0eN7BtdAH7W+6iR3/gqVtgNLKBj6Ye9qx/oDlhYrZUk w4M3g24xJ/uic2AItvfjRA46bKuy3FR8xfFhD6RusdpVSEMHKO0fNXSR4nWlx4ydms7DBRgRWC ANEc1O5RKZYioyKl9mgWSlu2NzSOMcu1X8vgXTdesMc1ein/YO0zLjBRsx+d2tC6DG54tAcvhh 3UA0gupD0+HrfEyNZdK8HuxhZOQEj+wFkXys5WgLB76FFoBLDUOKCHe1956QxrKvA/H+nDi7Lx IDp16xvmOL1o9MNVjc9jevHlIqEOHmmIDIuM8EAqhaCMFg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=mrR0WAscQgjypFP9i8HpPPfNLAgDKC1xUGu0FQ3qIYI=; b=T34JKw3K8JM1Pjqf5DZmsEaUy/ qAjDV5AXB+Zk6V0GBqnpTB9gCfUqOMODEsY0K6Wx6JdN6+g5FK/87cfAOzyB5IsAV8/m+3WGXD0tC 5gU2MaGIh0Bso5LYyZ4qqUSHXJ5t6+WWIsBc80wuzZpTbdAIVEyg6NGx8A2TPQq5gsChWCDMjG2xO CXM/+PbA0K6oO1dODWQ/JLQoqJAIjD2QWTS4OLAM8PY3zVuzjLgThQwT5dH/SMwSlyKdFOqQ0ngRJ Kzu5nGSjvzdqx4JgBdknjIUel3tk2UNqoA2aBVnaZOxoD/L59538ji9MlEdPMIGdqEwMFzhcDsBa3 2JFVWdvA==; Received: by zero.zsh.org with local id 1q2mR8-000Ed2-6u; Sat, 27 May 2023 05:25:54 +0000 Authentication-Results: zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202305e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202305 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none Received: from mx.spodhuis.org ([94.142.241.89]:61505) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1q2mQa-000EIu-OH; Sat, 27 May 2023 05:25:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202305; h=OpenPGP:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:From:Reply-To:Subject:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:In-Reply-To: References:OpenPGP:Organization:Auto-Submitted; bh=mrR0WAscQgjypFP9i8HpPPfNLAgDKC1xUGu0FQ3qIYI=; t=1685165120; x=1686374720; b=PqOE6C5PM3OZQiZaR9O88pQvWJNzkcCL5GWZSDaRf+B1ubeoK9/CbmXWmdYDvNv3Qg9gp9b3NJ0 HJhu1elTxl2SbAAvf9QUNpbAdach+/6uEXP8Duqs8q2K46/n+10pwHCtBsUd7tKetzRuElHHDTg+B ltD1XpQIqSJDuRTxahdneBu+8vBx86j1pSrfvSsNMW2U1IQVA9j1WCHs4At+g9fonCuJwVz74ageP 8i67UXZks0em68gnDAsKWdyZVxYXik2OBhq7CdjloAC3Gn/6uClTEYsIRv5KFCAo2YH9BamGizF3O x6mOJiWARwcr9m5RQOCVI6NFjdGhzp8H5vLg==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202305e2; h=OpenPGP:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:From:Reply-To:Subject:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:In-Reply-To: References:OpenPGP:Organization:Auto-Submitted; bh=mrR0WAscQgjypFP9i8HpPPfNLAgDKC1xUGu0FQ3qIYI=; t=1685165120; x=1686374720; b=VUm6IFiTkBWDX1d5gso3km63iJIwbIq3l/D3UtdqXqpvK0jlxeaZYl2pjjgHklmYb8+dukfMQGP tQQBP1chzCw==; Received: from authenticated user by smtp.spodhuis.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1q2mQZ-000EIo-SO; Sat, 27 May 2023 05:25:20 +0000 Date: Sat, 27 May 2023 01:25:17 -0400 From: Phil Pennock To: zsh-workers@zsh.org Subject: bug: whence -wa / none / argv position Message-ID: Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc X-Seq: 51802 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Invoking `whence -wa` with multiple arguments, where one does not exist, has different results depending upon whether the non-existing one is first in the list or not. % PS1='%?%# ' 0% whence -wa ls foo echo ls: command echo: builtin echo: command 0% whence -wa foo ls echo foo: none ls: command echo: builtin echo: command 1% whence -wa ls echo foo ls: command echo: builtin echo: command 0% If I use `whence -a` then it _always_ ignores the non-existent foo. If I use `whence -w` then it _always_ reports `foo: none` and exits 1. It's when I use `whence -wa` that this only shows the "none" item (and exits non-zero) when the item is first. Built zsh at head (no local patches) to confirm this is still current: typeset ZSH_VERSION=5.9.0.1-dev typeset ZSH_PATCHLEVEL=pdp/master/zsh-5.9-209-g88eeade0b -Phil